How do I access the data inside a Numeric array object?
Use a cdef extern from block to include the Numeric header file and declare the array object as an external extension type. The following code illustrates how to do this: cdef extern from “Numeric/arrayobject.h”: struct PyArray_Descr: int type_num, elsize char type ctypedef class Numeric.ArrayType [object PyArrayObject]: cdef char *data cdef int nd cdef int *dimensions, *strides cdef object base cdef PyArray_Descr *descr cdef int flags For more information about external extension types, see the “External Extension Types” section of the “Extension Types” documentation page.