[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
liboctave's NDArray conversion to float array
From: |
Robert Brothers |
Subject: |
liboctave's NDArray conversion to float array |
Date: |
Wed, 8 Nov 2017 10:42:38 -0600 |
To whom it may concern,
I am using octave’s C++ compiler/wrapper to generate arrays. I need to
store them in a binary dat file for later access. I need to convert the NDArray
type to a double array for storage and later use using armadillo. I am having
trouble finding a method to convert to a double array or pointer.
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();
Is this possible? (Not this ^^ exactly but some method that makes this
possible) Or is there some work around that may be helpful?
- liboctave's NDArray conversion to float array,
Robert Brothers <=