From 97d7ad39617ec1d61f03b0d88588ecc90afc883a Mon Sep 17 00:00:00 2001 From: Mark Lodato Date: Fri, 16 Oct 2009 19:38:02 -0400 Subject: [PATCH] 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 --- Cython/Includes/numpy.pxd | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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 -- 2.26.2