[SciPy-user] numpy array in ctype struct
Tue Jan 15 06:07:26 CST 2008
We are trying to create the following struct in ctypes:
double A, B;
_fields_ = [("n",c_int),("k",c_int),("A",c_double*16),("B",c_double*16)]
instance = embedded_array()
Is there a way to map the data in A/B into a numpy array, so that we
can use it directly?
Alternatively, is there a way to quickly copy data from a numpy array
into/out of the ctypes structure?
Thanks in advance,
More information about the SciPy-user