[Numpy-discussion] Using ndpointer with ctypes argtypes

Josh Mayer joshuaamayer at gmail.com
Fri Mar 11 13:25:01 EST 2011

I am trying to call a C function that takes a double array as one of
its parameters.

I am using ndpointer to define the argtypes so that I can pass a numpy
array directly.  The issue I'm having is that this parameter need not
always be set, and when it is not set, the C functions expects a null
pointer to a double in it's place. Is there any way I can set up a
numpy array such that when ndpointer calls from_param() it returns a
null pointer? Or is there some other way to go about it?


More information about the NumPy-Discussion mailing list