Casting PyArrayObjects to C types

Chris Fonnesbeck spam at fisher.forestry.uga.edu
Mon May 27 16:30:41 EDT 2002


Most of the references to interacting python with C are with respect
to extending, rather than embedding python. I am interested in the
latter. For example, how can I take a PyArrayObject, say a
PyArray_DOUBLE and convert it to a double[] type in C? I have a C
function that must call python code to get a Numeric Python array,
change it to a standard C array, and return it.  How would I do this.

Many thanks in advance,
cjf



More information about the Python-list mailing list