[Numpy-discussion] C++ class encapsulating ctypes-numpy array?

Joris De Ridder Joris.DeRidder at ster.kuleuven.be
Thu Mar 20 10:28:03 EDT 2008


> You can use ctypes if and ony if the C++ object is only used in one  
> function call. You can't for instance create a C++ container with  
> ctypes, then in Python call some method and then delete the  
> container, because ctypes will destroy the data after the C++  
> container was built. This is the only drawback of ctypes.

I'm not sure I understand. Could you perhaps give a pointer for  
additional info, or an example?


> When it comes to strides, you have to divide them by the size of  
> your data : the stride is counted in bytes and not in short/float/...

Yep, I did this on the Python side. Thanks for the remark, though.

Cheers,
Joris


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




More information about the NumPy-Discussion mailing list