help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: liboctave's NDArray conversion to float array


From: Andreas Weber
Subject: Re: liboctave's NDArray conversion to float array
Date: Wed, 8 Nov 2017 18:33:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Am 08.11.2017 um 17:42 schrieb Robert Brothers:
> To whom it may concern,
> What I’m looking for:
> 
>       NDArray A = args.array_value();
>       
>       // convert this value to a double or float array
>       float a[] = A.return_NDArray_raw_data();
>       
>       or 
>       
>       double a[] = A.return_NDArray_raw_data();

yes, see the method fortran_vec() which gives you a double* so you can
interate up to numel()

http://octave.org/doxygen/4.2/d0/d26/classArray.html#a67b2e787997a741df610756815ed4f95

-- Andy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]