Hi everyone,
I am wrapping a function using CFFI with the following signature:
void c_compute(int ndim, const int *shape, double *data)
to a function which takes a Numpy array:
and I want to extract d, n and data from the array parameter in an efficient way.
for ndim, I use array.ndim,
for data, I use array.ctypes.data and cast it to double* with an ffi.cast
for shape however, I am stuck.
I though about using something like:
ffi.cast('const int *', array.ctypes.shape_as(ctypes.c_int))
But the cast does not seem to be allowed. What am I missing ?
Cheers,
- Ghis