2
# :Copyright: 2004, Enthought, Inc.
6
cdef extern from "numpy/arrayobject.h":
7
ctypedef enum PyArray_TYPES:
34
ctypedef extern class numpy.dtype [object PyArray_Descr]:
35
cdef int type_num, elsize, alignment
36
cdef char type, kind, byteorder, hasobject
37
cdef object fields, typeobj
39
ctypedef extern class numpy.ndarray [object PyArrayObject]:
48
ndarray PyArray_SimpleNew(int ndims, intp* dims, int item_type)
49
int PyArray_Check(object obj)
50
ndarray PyArray_ContiguousFromObject(object obj, PyArray_TYPES type,
51
int mindim, int maxdim)
52
intp PyArray_SIZE(ndarray arr)
53
void *PyArray_DATA(ndarray arr)
54
ndarray PyArray_FromAny(object obj, dtype newtype, int mindim, int maxdim,
55
int requirements, object context)
56
ndarray PyArray_NewFromDescr(object subtype, dtype newtype, int nd, intp* dims,
57
intp* strides, void* data, int flags, object parent)