[Numpy-discussion] C++ class encapsulating ctypes-numpy array?
Joris De Ridder
Joris.DeRidder@ster.kuleuven...
Wed Mar 19 09:58:35 CDT 2008
Hi,
I'm passing (possibly non-contiguous) numpy arrays (data + shape +
strides + ndim) with ctypes to my C++ function (with external "C" to
make ctypes happy). Has anyone made a C++ class derived from a ctypes-
numpy-array with an overloaded [] operator to allow easy indexing
(e.g. x[0][2][5] for a 3D array) so that you don't have to worry about
strides? I guess I'm not the first one thinking about this...
Cheers,
Joris
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
More information about the Numpy-discussion
mailing list