1
# :Author: Travis Oliphant
3
cdef extern from "numpy/arrayobject.h":
30
cdef enum requirements:
64
ctypedef struct npy_cdouble:
68
ctypedef struct npy_cfloat:
74
ctypedef extern class numpy.dtype [object PyArray_Descr]:
75
cdef int type_num, elsize, alignment
76
cdef char type, kind, byteorder, hasobject
77
cdef object fields, typeobj
79
ctypedef extern class numpy.ndarray [object PyArrayObject]:
82
cdef npy_intp *dimensions
83
cdef npy_intp *strides
88
ctypedef extern class numpy.flatiter [object PyArrayIterObject]:
90
cdef npy_intp index, size
94
ctypedef extern class numpy.broadcast [object PyArrayMultiIterObject]:
96
cdef npy_intp size, index
98
cdef npy_intp *dimensions
101
object PyArray_ZEROS(int ndims, npy_intp* dims, NPY_TYPES type_num, int fortran)
102
object PyArray_EMPTY(int ndims, npy_intp* dims, NPY_TYPES type_num, int fortran)
103
dtype PyArray_DescrFromTypeNum(NPY_TYPES type_num)
104
object PyArray_SimpleNew(int ndims, npy_intp* dims, NPY_TYPES type_num)
105
int PyArray_Check(object obj)
106
object PyArray_ContiguousFromAny(object obj, NPY_TYPES type,
107
int mindim, int maxdim)
108
object PyArray_ContiguousFromObject(object obj, NPY_TYPES type,
109
int mindim, int maxdim)
110
npy_intp PyArray_SIZE(ndarray arr)
111
npy_intp PyArray_NBYTES(ndarray arr)
112
void *PyArray_DATA(ndarray arr)
113
object PyArray_FromAny(object obj, dtype newtype, int mindim, int maxdim,
114
int requirements, object context)
115
object PyArray_FROMANY(object obj, NPY_TYPES type_num, int min,
116
int max, int requirements)
117
object PyArray_NewFromDescr(object subtype, dtype newtype, int nd,
118
npy_intp* dims, npy_intp* strides, void* data,
119
int flags, object parent)
121
object PyArray_FROM_OTF(object obj, NPY_TYPES type, int flags)
122
object PyArray_EnsureArray(object)
124
object PyArray_MultiIterNew(int n, ...)
126
char *PyArray_MultiIter_DATA(broadcast multi, int i)
127
void PyArray_MultiIter_NEXTi(broadcast multi, int i)
128
void PyArray_MultiIter_NEXT(broadcast multi)
130
object PyArray_IterNew(object arr)
131
void PyArray_ITER_NEXT(flatiter it)