[Numpy-discussion] Getting a numpy array from a ctype pointer

Paulo J. S. Silva pjssilva at ime.usp.br
Thu Sep 4 15:45:31 EDT 2008


Hello,

I am writing some code interfacing C and Python using ctypes. In a
callback function (in Python) I get in a parameter x which is c_double
pointer and a parameter n which is c_int representing the length of the
array. 

How can I transform this information into a numpy array?

Paulo





More information about the NumPy-Discussion mailing list