Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I access the data inside a Numeric array object?

array Data numeric object
0
Posted

How do I access the data inside a Numeric array object?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123