From: Mark Lodato Date: Fri, 16 Oct 2009 23:38:02 +0000 (-0400) Subject: numpy.pxd: add NPY_UINT64 and family X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=97d7ad39617ec1d61f03b0d88588ecc90afc883a;p=cython.git numpy.pxd: add NPY_UINT64 and family This provides a fast way to check to see the data type of an ndarray. For example, to check to see if an integer is 64 bits: PyArray_TYPE(a) == NPY_UINT64 or PyArray_TYPE(a) == NPY_INT64 --- diff --git a/Cython/Includes/numpy.pxd b/Cython/Includes/numpy.pxd index 98f73460..1d84e9fb 100644 --- a/Cython/Includes/numpy.pxd +++ b/Cython/Includes/numpy.pxd @@ -52,6 +52,33 @@ cdef extern from "numpy/arrayobject.h": NPY_NTYPES NPY_NOTYPE + NPY_INT8 + NPY_INT16 + NPY_INT32 + NPY_INT64 + NPY_INT128 + NPY_INT256 + NPY_UINT8 + NPY_UINT16 + NPY_UINT32 + NPY_UINT64 + NPY_UINT128 + NPY_UINT256 + NPY_FLOAT16 + NPY_FLOAT32 + NPY_FLOAT64 + NPY_FLOAT80 + NPY_FLOAT96 + NPY_FLOAT128 + NPY_FLOAT256 + NPY_COMPLEX32 + NPY_COMPLEX64 + NPY_COMPLEX128 + NPY_COMPLEX160 + NPY_COMPLEX192 + NPY_COMPLEX256 + NPY_COMPLEX512 + enum NPY_ORDER: NPY_ANYORDER NPY_CORDER