numpy  2.0.0
include/numpy/ndarraytypes.h File Reference
#include "npy_common.h"
#include "npy_endian.h"
#include "npy_cpu.h"
#include "utils.h"
#include "_neighborhood_iterator_imp.h"
#include "npy_1_7_deprecated_api.h"

Go to the source code of this file.

Data Structures

struct  NpyAuxData_tag
struct  PyArray_Dims
struct  PyArray_ArrFuncs
struct  _PyArray_Descr
struct  _arr_descr
struct  tagPyArrayObject_fields
struct  PyArrayFlagsObject
struct  PyArray_Chunk
struct  PyArray_DatetimeMetaData
struct  PyArray_DatetimeDTypeMetaData
struct  npy_datetimestruct
struct  npy_timedeltastruct
struct  PyArrayIterObject_tag
struct  PyArrayMultiIterObject
struct  PyArrayMapIterObject
struct  PyArrayNeighborhoodIterObject
struct  npy_stride_sort_item
struct  PyArrayInterface

Defines

#define NPY_NO_EXPORT   NPY_VISIBILITY_HIDDEN
#define NPY_ALLOW_THREADS   0
#define NPY_MAXDIMS   32
#define NPY_MAXARGS   32
#define NPY_FAIL   0
#define NPY_SUCCEED   1
#define NPY_VERSION   NPY_ABI_VERSION
#define NPY_FEATURE_VERSION   NPY_API_VERSION
#define NPY_PRIORITY   0.0
#define NPY_SUBTYPE_PRIORITY   1.0
#define NPY_SCALAR_PRIORITY   -1000000.0
#define NPY_NUM_FLOATTYPE   3
#define NPY_NSORTS   (NPY_MERGESORT + 1)
#define NPY_NSELECTS   (NPY_INTROSELECT + 1)
#define NPY_NSEARCHSIDES   (NPY_SEARCHRIGHT + 1)
#define NPY_NSCALARKINDS   (NPY_OBJECT_SCALAR + 1)
#define NPY_DATETIME_NAT   NPY_MIN_INT64
#define NPY_DATETIME_MAX_ISO8601_STRLEN   (21+3*5+1+3*6+6+1)
#define NPY_DATETIME_NUMUNITS   (NPY_FR_GENERIC + 1)
#define NPY_DATETIME_DEFAULTUNIT   NPY_FR_GENERIC
#define NPY_AUXDATA_FREE(auxdata)
#define NPY_AUXDATA_CLONE(auxdata)   ((auxdata)->clone(auxdata))
#define NPY_ERR(str)   fprintf(stderr, #str); fflush(stderr);
#define NPY_ERR2(str)   fprintf(stderr, str); fflush(stderr);
#define NPY_STRINGIFY(x)   #x
#define NPY_TOSTRING(x)   NPY_STRINGIFY(x)
#define NPY_USE_PYMEM   1
#define PyArray_malloc   PyMem_Malloc
#define PyArray_free   PyMem_Free
#define PyArray_realloc   PyMem_Realloc
#define PyDimMem_NEW(size)   ((npy_intp *)PyArray_malloc(size*sizeof(npy_intp)))
#define PyDimMem_FREE(ptr)   PyArray_free(ptr)
#define PyDimMem_RENEW(ptr, size)   ((npy_intp *)PyArray_realloc(ptr,size*sizeof(npy_intp)))
#define NPY_ITEM_REFCOUNT   0x01
#define NPY_ITEM_HASOBJECT   0x01
#define NPY_LIST_PICKLE   0x02
#define NPY_ITEM_IS_POINTER   0x04
#define NPY_NEEDS_INIT   0x08
#define NPY_NEEDS_PYAPI   0x10
#define NPY_USE_GETITEM   0x20
#define NPY_USE_SETITEM   0x40
#define NPY_ALIGNED_STRUCT   0x80
#define NPY_FROM_FIELDS
#define NPY_OBJECT_DTYPE_FLAGS
#define PyDataType_FLAGCHK(dtype, flag)   (((dtype)->flags & (flag)) == (flag))
#define PyDataType_REFCHK(dtype)   PyDataType_FLAGCHK(dtype, NPY_ITEM_REFCOUNT)
#define NPY_SIZEOF_PYARRAYOBJECT   (sizeof(PyArrayObject_fields))
#define NPY_ARRAY_C_CONTIGUOUS   0x0001
#define NPY_ARRAY_F_CONTIGUOUS   0x0002
#define NPY_ARRAY_OWNDATA   0x0004
#define NPY_ARRAY_FORCECAST   0x0010
#define NPY_ARRAY_ENSURECOPY   0x0020
#define NPY_ARRAY_ENSUREARRAY   0x0040
#define NPY_ARRAY_ELEMENTSTRIDES   0x0080
#define NPY_ARRAY_ALIGNED   0x0100
#define NPY_ARRAY_NOTSWAPPED   0x0200
#define NPY_ARRAY_WRITEABLE   0x0400
#define NPY_ARRAY_UPDATEIFCOPY   0x1000
#define NPY_ARRAY_BEHAVED
#define NPY_ARRAY_BEHAVED_NS
#define NPY_ARRAY_CARRAY
#define NPY_ARRAY_CARRAY_RO
#define NPY_ARRAY_FARRAY
#define NPY_ARRAY_FARRAY_RO
#define NPY_ARRAY_DEFAULT   (NPY_ARRAY_CARRAY)
#define NPY_ARRAY_IN_ARRAY   (NPY_ARRAY_CARRAY_RO)
#define NPY_ARRAY_OUT_ARRAY   (NPY_ARRAY_CARRAY)
#define NPY_ARRAY_INOUT_ARRAY
#define NPY_ARRAY_IN_FARRAY   (NPY_ARRAY_FARRAY_RO)
#define NPY_ARRAY_OUT_FARRAY   (NPY_ARRAY_FARRAY)
#define NPY_ARRAY_INOUT_FARRAY
#define NPY_ARRAY_UPDATE_ALL
#define NPY_ARR_HAS_DESCR   0x0800
#define NPY_MIN_BUFSIZE   ((int)sizeof(npy_cdouble))
#define NPY_MAX_BUFSIZE   (((int)sizeof(npy_cdouble))*1000000)
#define NPY_BUFSIZE   8192
#define PyArray_MAX(a, b)   (((a)>(b))?(a):(b))
#define PyArray_MIN(a, b)   (((a)<(b))?(a):(b))
#define PyArray_CLT(p, q)
#define PyArray_CGT(p, q)
#define PyArray_CLE(p, q)
#define PyArray_CGE(p, q)
#define PyArray_CEQ(p, q)   (((p).real==(q).real) && ((p).imag == (q).imag))
#define PyArray_CNE(p, q)   (((p).real!=(q).real) || ((p).imag != (q).imag))
#define PyArray_ISCONTIGUOUS(m)   PyArray_CHKFLAGS(m, NPY_ARRAY_C_CONTIGUOUS)
#define PyArray_ISWRITEABLE(m)   PyArray_CHKFLAGS(m, NPY_ARRAY_WRITEABLE)
#define PyArray_ISALIGNED(m)   PyArray_CHKFLAGS(m, NPY_ARRAY_ALIGNED)
#define PyArray_IS_C_CONTIGUOUS(m)   PyArray_CHKFLAGS(m, NPY_ARRAY_C_CONTIGUOUS)
#define PyArray_IS_F_CONTIGUOUS(m)   PyArray_CHKFLAGS(m, NPY_ARRAY_F_CONTIGUOUS)
#define NPY_BEGIN_THREADS_DEF   PyThreadState *_save=NULL;
#define NPY_BEGIN_ALLOW_THREADS
#define NPY_END_ALLOW_THREADS
#define NPY_BEGIN_THREADS
#define NPY_END_THREADS
#define NPY_BEGIN_THREADS_THRESHOLDED(loop_size)
#define NPY_BEGIN_THREADS_DESCR(dtype)
#define NPY_END_THREADS_DESCR(dtype)
#define NPY_ALLOW_C_API_DEF
#define NPY_ALLOW_C_API
#define NPY_DISABLE_C_API
#define NPY_ITER_C_INDEX   0x00000001
#define NPY_ITER_F_INDEX   0x00000002
#define NPY_ITER_MULTI_INDEX   0x00000004
#define NPY_ITER_EXTERNAL_LOOP   0x00000008
#define NPY_ITER_COMMON_DTYPE   0x00000010
#define NPY_ITER_REFS_OK   0x00000020
#define NPY_ITER_ZEROSIZE_OK   0x00000040
#define NPY_ITER_REDUCE_OK   0x00000080
#define NPY_ITER_RANGED   0x00000100
#define NPY_ITER_BUFFERED   0x00000200
#define NPY_ITER_GROWINNER   0x00000400
#define NPY_ITER_DELAY_BUFALLOC   0x00000800
#define NPY_ITER_DONT_NEGATE_STRIDES   0x00001000
#define NPY_ITER_READWRITE   0x00010000
#define NPY_ITER_READONLY   0x00020000
#define NPY_ITER_WRITEONLY   0x00040000
#define NPY_ITER_NBO   0x00080000
#define NPY_ITER_ALIGNED   0x00100000
#define NPY_ITER_CONTIG   0x00200000
#define NPY_ITER_COPY   0x00400000
#define NPY_ITER_UPDATEIFCOPY   0x00800000
#define NPY_ITER_ALLOCATE   0x01000000
#define NPY_ITER_NO_SUBTYPE   0x02000000
#define NPY_ITER_VIRTUAL   0x04000000
#define NPY_ITER_NO_BROADCAST   0x08000000
#define NPY_ITER_WRITEMASKED   0x10000000
#define NPY_ITER_ARRAYMASK   0x20000000
#define NPY_ITER_GLOBAL_FLAGS   0x0000ffff
#define NPY_ITER_PER_OP_FLAGS   0xffff0000
#define PyArrayIter_Check(op)   PyObject_TypeCheck(op, &PyArrayIter_Type)
#define _PyAIT(it)   ((PyArrayIterObject *)(it))
#define PyArray_ITER_RESET(it)
#define _PyArray_ITER_NEXT1(it)
#define _PyArray_ITER_NEXT2(it)
#define PyArray_ITER_NEXT(it)
#define PyArray_ITER_GOTO(it, destination)
#define PyArray_ITER_GOTO1D(it, ind)
#define PyArray_ITER_DATA(it)   ((void *)(_PyAIT(it)->dataptr))
#define PyArray_ITER_NOTDONE(it)   (_PyAIT(it)->index < _PyAIT(it)->size)
#define _PyMIT(m)   ((PyArrayMultiIterObject *)(m))
#define PyArray_MultiIter_RESET(multi)
#define PyArray_MultiIter_NEXT(multi)
#define PyArray_MultiIter_GOTO(multi, dest)
#define PyArray_MultiIter_GOTO1D(multi, ind)
#define PyArray_MultiIter_DATA(multi, i)   ((void *)(_PyMIT(multi)->iters[i]->dataptr))
#define PyArray_MultiIter_NEXTi(multi, i)   PyArray_ITER_NEXT(_PyMIT(multi)->iters[i])
#define PyArray_MultiIter_NOTDONE(multi)   (_PyMIT(multi)->index < _PyMIT(multi)->size)
#define _NPY_INCLUDE_NEIGHBORHOOD_IMP
#define NPY_DEFAULT_TYPE   NPY_DOUBLE
#define PyArray_ISONESEGMENT(m)
#define PyArray_ISFORTRAN(m)
#define PyArray_FORTRAN_IF(m)
#define PyArray_NDIM(obj)   (((PyArrayObject_fields *)(obj))->nd)
#define PyArray_BYTES(obj)   (((PyArrayObject_fields *)(obj))->data)
#define PyArray_DATA(obj)   ((void *)((PyArrayObject_fields *)(obj))->data)
#define PyArray_DIMS(obj)   (((PyArrayObject_fields *)(obj))->dimensions)
#define PyArray_STRIDES(obj)   (((PyArrayObject_fields *)(obj))->strides)
#define PyArray_DIM(obj, n)   (PyArray_DIMS(obj)[n])
#define PyArray_STRIDE(obj, n)   (PyArray_STRIDES(obj)[n])
#define PyArray_BASE(obj)   (((PyArrayObject_fields *)(obj))->base)
#define PyArray_DESCR(obj)   (((PyArrayObject_fields *)(obj))->descr)
#define PyArray_FLAGS(obj)   (((PyArrayObject_fields *)(obj))->flags)
#define PyArray_CHKFLAGS(m, FLAGS)   ((((PyArrayObject_fields *)(m))->flags & (FLAGS)) == (FLAGS))
#define PyArray_ITEMSIZE(obj)   (((PyArrayObject_fields *)(obj))->descr->elsize)
#define PyArray_TYPE(obj)   (((PyArrayObject_fields *)(obj))->descr->type_num)
#define PyArray_GETITEM(obj, itemptr)
#define PyArray_SETITEM(obj, itemptr, v)
#define PyTypeNum_ISBOOL(type)   ((type) == NPY_BOOL)
#define PyTypeNum_ISUNSIGNED(type)
#define PyTypeNum_ISSIGNED(type)
#define PyTypeNum_ISINTEGER(type)
#define PyTypeNum_ISFLOAT(type)
#define PyTypeNum_ISNUMBER(type)
#define PyTypeNum_ISSTRING(type)
#define PyTypeNum_ISCOMPLEX(type)
#define PyTypeNum_ISPYTHON(type)
#define PyTypeNum_ISFLEXIBLE(type)
#define PyTypeNum_ISDATETIME(type)
#define PyTypeNum_ISUSERDEF(type)
#define PyTypeNum_ISEXTENDED(type)
#define PyTypeNum_ISOBJECT(type)   ((type) == NPY_OBJECT)
#define PyDataType_ISBOOL(obj)   PyTypeNum_ISBOOL(_PyADt(obj))
#define PyDataType_ISUNSIGNED(obj)   PyTypeNum_ISUNSIGNED(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISSIGNED(obj)   PyTypeNum_ISSIGNED(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISINTEGER(obj)   PyTypeNum_ISINTEGER(((PyArray_Descr*)(obj))->type_num )
#define PyDataType_ISFLOAT(obj)   PyTypeNum_ISFLOAT(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISNUMBER(obj)   PyTypeNum_ISNUMBER(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISSTRING(obj)   PyTypeNum_ISSTRING(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISCOMPLEX(obj)   PyTypeNum_ISCOMPLEX(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISPYTHON(obj)   PyTypeNum_ISPYTHON(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISFLEXIBLE(obj)   PyTypeNum_ISFLEXIBLE(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISDATETIME(obj)   PyTypeNum_ISDATETIME(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISUSERDEF(obj)   PyTypeNum_ISUSERDEF(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISEXTENDED(obj)   PyTypeNum_ISEXTENDED(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISOBJECT(obj)   PyTypeNum_ISOBJECT(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_HASFIELDS(obj)   (((PyArray_Descr *)(obj))->names != NULL)
#define PyDataType_HASSUBARRAY(dtype)   ((dtype)->subarray != NULL)
#define PyArray_ISBOOL(obj)   PyTypeNum_ISBOOL(PyArray_TYPE(obj))
#define PyArray_ISUNSIGNED(obj)   PyTypeNum_ISUNSIGNED(PyArray_TYPE(obj))
#define PyArray_ISSIGNED(obj)   PyTypeNum_ISSIGNED(PyArray_TYPE(obj))
#define PyArray_ISINTEGER(obj)   PyTypeNum_ISINTEGER(PyArray_TYPE(obj))
#define PyArray_ISFLOAT(obj)   PyTypeNum_ISFLOAT(PyArray_TYPE(obj))
#define PyArray_ISNUMBER(obj)   PyTypeNum_ISNUMBER(PyArray_TYPE(obj))
#define PyArray_ISSTRING(obj)   PyTypeNum_ISSTRING(PyArray_TYPE(obj))
#define PyArray_ISCOMPLEX(obj)   PyTypeNum_ISCOMPLEX(PyArray_TYPE(obj))
#define PyArray_ISPYTHON(obj)   PyTypeNum_ISPYTHON(PyArray_TYPE(obj))
#define PyArray_ISFLEXIBLE(obj)   PyTypeNum_ISFLEXIBLE(PyArray_TYPE(obj))
#define PyArray_ISDATETIME(obj)   PyTypeNum_ISDATETIME(PyArray_TYPE(obj))
#define PyArray_ISUSERDEF(obj)   PyTypeNum_ISUSERDEF(PyArray_TYPE(obj))
#define PyArray_ISEXTENDED(obj)   PyTypeNum_ISEXTENDED(PyArray_TYPE(obj))
#define PyArray_ISOBJECT(obj)   PyTypeNum_ISOBJECT(PyArray_TYPE(obj))
#define PyArray_HASFIELDS(obj)   PyDataType_HASFIELDS(PyArray_DESCR(obj))
#define PyArray_ISVARIABLE(obj)   PyTypeNum_ISFLEXIBLE(PyArray_TYPE(obj))
#define PyArray_SAFEALIGNEDCOPY(obj)   (PyArray_ISALIGNED(obj) && !PyArray_ISVARIABLE(obj))
#define NPY_LITTLE   '<'
#define NPY_BIG   '>'
#define NPY_NATIVE   '='
#define NPY_SWAP   's'
#define NPY_IGNORE   '|'
#define NPY_NATBYTE   NPY_LITTLE
#define NPY_OPPBYTE   NPY_BIG
#define PyArray_ISNBO(arg)   ((arg) != NPY_OPPBYTE)
#define PyArray_IsNativeByteOrder   PyArray_ISNBO
#define PyArray_ISNOTSWAPPED(m)   PyArray_ISNBO(PyArray_DESCR(m)->byteorder)
#define PyArray_ISBYTESWAPPED(m)   (!PyArray_ISNOTSWAPPED(m))
#define PyArray_FLAGSWAP(m, flags)
#define PyArray_ISCARRAY(m)   PyArray_FLAGSWAP(m, NPY_ARRAY_CARRAY)
#define PyArray_ISCARRAY_RO(m)   PyArray_FLAGSWAP(m, NPY_ARRAY_CARRAY_RO)
#define PyArray_ISFARRAY(m)   PyArray_FLAGSWAP(m, NPY_ARRAY_FARRAY)
#define PyArray_ISFARRAY_RO(m)   PyArray_FLAGSWAP(m, NPY_ARRAY_FARRAY_RO)
#define PyArray_ISBEHAVED(m)   PyArray_FLAGSWAP(m, NPY_ARRAY_BEHAVED)
#define PyArray_ISBEHAVED_RO(m)   PyArray_FLAGSWAP(m, NPY_ARRAY_ALIGNED)
#define PyDataType_ISNOTSWAPPED(d)   PyArray_ISNBO(((PyArray_Descr *)(d))->byteorder)
#define PyDataType_ISBYTESWAPPED(d)   (!PyDataType_ISNOTSWAPPED(d))
#define NPY_DEPRECATED_INCLUDES

Typedefs

typedef struct NpyAuxData_tag NpyAuxData
typedef void( NpyAuxData_FreeFunc )(NpyAuxData *)
typedef NpyAuxData *( NpyAuxData_CloneFunc )(NpyAuxData *)
typedef PyObject *( PyArray_GetItemFunc )(void *, void *)
typedef int( PyArray_SetItemFunc )(PyObject *, void *, void *)
typedef void( PyArray_CopySwapNFunc )(void *, npy_intp, void *, npy_intp, npy_intp, int, void *)
typedef void( PyArray_CopySwapFunc )(void *, void *, int, void *)
typedef npy_boolPyArray_NonzeroFunc )(void *, void *)
typedef int( PyArray_CompareFunc )(const void *, const void *, void *)
typedef int( PyArray_ArgFunc )(void *, npy_intp, npy_intp *, void *)
typedef void( PyArray_DotFunc )(void *, npy_intp, void *, npy_intp, void *, npy_intp, void *)
typedef void( PyArray_VectorUnaryFunc )(void *, void *, npy_intp, void *, void *)
typedef int( PyArray_ScanFunc )(FILE *fp, void *dptr, char *ignore, struct _PyArray_Descr *)
typedef int( PyArray_FromStrFunc )(char *s, void *dptr, char **endptr, struct _PyArray_Descr *)
typedef int( PyArray_FillFunc )(void *, npy_intp, void *)
typedef int( PyArray_SortFunc )(void *, npy_intp, void *)
typedef int( PyArray_ArgSortFunc )(void *, npy_intp *, npy_intp, void *)
typedef int( PyArray_PartitionFunc )(void *, npy_intp, npy_intp, npy_intp *, npy_intp *, void *)
typedef int( PyArray_ArgPartitionFunc )(void *, npy_intp *, npy_intp, npy_intp, npy_intp *, npy_intp *, void *)
typedef int( PyArray_FillWithScalarFunc )(void *, npy_intp, void *, void *)
typedef int( PyArray_ScalarKindFunc )(void *)
typedef void( PyArray_FastClipFunc )(void *in, npy_intp n_in, void *min, void *max, void *out)
typedef void( PyArray_FastPutmaskFunc )(void *in, void *mask, npy_intp n_in, void *values, npy_intp nv)
typedef int( PyArray_FastTakeFunc )(void *dest, void *src, npy_intp *indarray, npy_intp nindarray, npy_intp n_outer, npy_intp m_middle, npy_intp nelem, NPY_CLIPMODE clipmode)
typedef struct _PyArray_Descr PyArray_Descr
typedef struct _arr_descr PyArray_ArrayDescr
typedef struct
tagPyArrayObject_fields 
PyArrayObject_fields
typedef PyArrayObject_fields PyArrayObject
typedef struct PyArrayFlagsObject PyArrayFlagsObject
typedef int( PyArray_FinalizeFunc )(PyArrayObject *, PyObject *)
typedef struct NpyIter_InternalOnly NpyIter
typedef int( NpyIter_IterNextFunc )(NpyIter *iter)
typedef void( NpyIter_GetMultiIndexFunc )(NpyIter *iter, npy_intp *outcoords)
typedef struct
PyArrayIterObject_tag 
PyArrayIterObject
typedef char *(* npy_iter_get_dataptr_t )(PyArrayIterObject *iter, npy_intp *)
typedef void( PyDataMem_EventHookFunc )(void *inp, void *outp, size_t size, void *user_data)

Enumerations

enum  NPY_TYPES {
  NPY_BOOL = 0, NPY_BYTE, NPY_UBYTE, NPY_SHORT,
  NPY_USHORT, NPY_INT, NPY_UINT, NPY_LONG,
  NPY_ULONG, NPY_LONGLONG, NPY_ULONGLONG, NPY_FLOAT,
  NPY_DOUBLE, NPY_LONGDOUBLE, NPY_CFLOAT, NPY_CDOUBLE,
  NPY_CLONGDOUBLE, NPY_OBJECT = 17, NPY_STRING, NPY_UNICODE,
  NPY_VOID, NPY_DATETIME, NPY_TIMEDELTA, NPY_HALF,
  NPY_NTYPES, NPY_NOTYPE, NPY_CHAR, NPY_USERDEF = 256,
  NPY_NTYPES_ABI_COMPATIBLE = 21
}
enum  NPY_TYPECHAR {
  NPY_BOOLLTR = '?', NPY_BYTELTR = 'b', NPY_UBYTELTR = 'B', NPY_SHORTLTR = 'h',
  NPY_USHORTLTR = 'H', NPY_INTLTR = 'i', NPY_UINTLTR = 'I', NPY_LONGLTR = 'l',
  NPY_ULONGLTR = 'L', NPY_LONGLONGLTR = 'q', NPY_ULONGLONGLTR = 'Q', NPY_HALFLTR = 'e',
  NPY_FLOATLTR = 'f', NPY_DOUBLELTR = 'd', NPY_LONGDOUBLELTR = 'g', NPY_CFLOATLTR = 'F',
  NPY_CDOUBLELTR = 'D', NPY_CLONGDOUBLELTR = 'G', NPY_OBJECTLTR = 'O', NPY_STRINGLTR = 'S',
  NPY_STRINGLTR2 = 'a', NPY_UNICODELTR = 'U', NPY_VOIDLTR = 'V', NPY_DATETIMELTR = 'M',
  NPY_TIMEDELTALTR = 'm', NPY_CHARLTR = 'c', NPY_INTPLTR = 'p', NPY_UINTPLTR = 'P',
  NPY_GENBOOLLTR = 'b', NPY_SIGNEDLTR = 'i', NPY_UNSIGNEDLTR = 'u', NPY_FLOATINGLTR = 'f',
  NPY_COMPLEXLTR = 'c'
}
enum  NPY_SORTKIND { NPY_QUICKSORT = 0, NPY_HEAPSORT = 1, NPY_MERGESORT = 2 }
enum  NPY_SELECTKIND { NPY_INTROSELECT = 0 }
enum  NPY_SEARCHSIDE { NPY_SEARCHLEFT = 0, NPY_SEARCHRIGHT = 1 }
enum  NPY_SCALARKIND {
  NPY_NOSCALAR = -1, NPY_BOOL_SCALAR, NPY_INTPOS_SCALAR, NPY_INTNEG_SCALAR,
  NPY_FLOAT_SCALAR, NPY_COMPLEX_SCALAR, NPY_OBJECT_SCALAR
}
enum  NPY_ORDER { NPY_ANYORDER = -1, NPY_CORDER = 0, NPY_FORTRANORDER = 1, NPY_KEEPORDER = 2 }
enum  NPY_CASTING {
  NPY_NO_CASTING = 0, NPY_EQUIV_CASTING = 1, NPY_SAFE_CASTING = 2, NPY_SAME_KIND_CASTING = 3,
  NPY_UNSAFE_CASTING = 4
}
enum  NPY_CLIPMODE { NPY_CLIP = 0, NPY_WRAP = 1, NPY_RAISE = 2 }
enum  NPY_DATETIMEUNIT {
  NPY_FR_Y = 0, NPY_FR_M = 1, NPY_FR_W = 2, NPY_FR_D = 4,
  NPY_FR_h = 5, NPY_FR_m = 6, NPY_FR_s = 7, NPY_FR_ms = 8,
  NPY_FR_us = 9, NPY_FR_ns = 10, NPY_FR_ps = 11, NPY_FR_fs = 12,
  NPY_FR_as = 13, NPY_FR_GENERIC = 14
}
enum  NPY_BUSDAY_ROLL {
  NPY_BUSDAY_FORWARD, NPY_BUSDAY_FOLLOWING = NPY_BUSDAY_FORWARD, NPY_BUSDAY_BACKWARD, NPY_BUSDAY_PRECEDING = NPY_BUSDAY_BACKWARD,
  NPY_BUSDAY_MODIFIEDFOLLOWING, NPY_BUSDAY_MODIFIEDPRECEDING, NPY_BUSDAY_NAT, NPY_BUSDAY_RAISE
}
enum  {
  NPY_NEIGHBORHOOD_ITER_ZERO_PADDING, NPY_NEIGHBORHOOD_ITER_ONE_PADDING, NPY_NEIGHBORHOOD_ITER_CONSTANT_PADDING, NPY_NEIGHBORHOOD_ITER_CIRCULAR_PADDING,
  NPY_NEIGHBORHOOD_ITER_MIRROR_PADDING
}

Functions

static NPY_INLINE int PyArrayNeighborhoodIter_Reset (PyArrayNeighborhoodIterObject *iter)
static NPY_INLINE int PyArrayNeighborhoodIter_Next (PyArrayNeighborhoodIterObject *iter)
static NPY_INLINE PyArray_DescrPyArray_DTYPE (PyArrayObject *arr)
static NPY_INLINE npy_intpPyArray_SHAPE (PyArrayObject *arr)
static NPY_INLINE void PyArray_ENABLEFLAGS (PyArrayObject *arr, int flags)
static NPY_INLINE void PyArray_CLEARFLAGS (PyArrayObject *arr, int flags)

Define Documentation

Include inline implementations - functions defined there are not considered public API
#define _PyAIT (   it)    ((PyArrayIterObject *)(it))
#define _PyArray_ITER_NEXT1 (   it)
Value:
do { \
        (it)->dataptr += _PyAIT(it)->strides[0]; \
        (it)->coordinates[0]++; \
} while (0)
#define _PyArray_ITER_NEXT2 (   it)
Value:
do { \
        if ((it)->coordinates[1] < (it)->dims_m1[1]) { \
                (it)->coordinates[1]++; \
                (it)->dataptr += (it)->strides[1]; \
        } \
        else { \
                (it)->coordinates[1] = 0; \
                (it)->coordinates[0]++; \
                (it)->dataptr += (it)->strides[0] - \
                        (it)->backstrides[1]; \
        } \
} while (0)
#define _PyMIT (   m)    ((PyArrayMultiIterObject *)(m))
#define NPY_ALIGNED_STRUCT   0x80
A sticky flag specifically for structured arrays
#define NPY_ALLOW_C_API

Referenced by _sign(), and npy_free_cache_dim().

Referenced by _sign(), and npy_free_cache_dim().

#define NPY_ALLOW_THREADS   0
Only use thread if configured in config and python supports it
#define NPY_ARR_HAS_DESCR   0x0800
This flag is for the array interface, not PyArrayObject
#define NPY_ARRAY_ALIGNED   0x0100
Array data is aligned on the appropriate memory address for the type stored according to how the compiler would align things (e.g., an array of integers (4 bytes each) starts on a memory address that's a multiple of 4)
This flag may be requested in constructor functions. This flag may be tested for in PyArray_FLAGS(arr).

Referenced by array_nonzero(), OBJECT_getitem(), PyArray_CanCoerceScalar(), PyArray_NewFlagsObject(), and PyArray_UpdateFlags().

Value:
(NPY_ARRAY_ALIGNED | \
                                NPY_ARRAY_WRITEABLE)
NOTE: there are also internal flags defined in multiarray/arrayobject.h, which start at bit 31 and work down.
Value:
(NPY_ARRAY_ALIGNED | \
                                NPY_ARRAY_WRITEABLE | \
                                NPY_ARRAY_NOTSWAPPED)
#define NPY_ARRAY_C_CONTIGUOUS   0x0001
Means c-style contiguous (last index varies the fastest). The data elements right after each other.
This flag may be requested in constructor functions. This flag may be tested for in PyArray_FLAGS(arr).

Referenced by _UpdateContiguousFlags(), array_setstate(), PyArray_NewFlagsObject(), and PyArray_UpdateFlags().

Value:
(NPY_ARRAY_C_CONTIGUOUS | \
                                NPY_ARRAY_BEHAVED)

Referenced by PyArray_ArgMax(), PyArray_CompareLists(), and PyArray_TakeFrom().

Value:
(NPY_ARRAY_C_CONTIGUOUS | \
                                NPY_ARRAY_ALIGNED)
#define NPY_ARRAY_ELEMENTSTRIDES   0x0080
Make sure that the strides are in units of the element size Needed for some operations with record-arrays.
This flag may be requested in constructor functions.
#define NPY_ARRAY_ENSUREARRAY   0x0040
Make sure the returned array is a base-class ndarray
This flag may be requested in constructor functions.
#define NPY_ARRAY_ENSURECOPY   0x0020
Always copy the array. Returned arrays are always CONTIGUOUS, ALIGNED, and WRITEABLE.
This flag may be requested in constructor functions.

Referenced by PyArray_TakeFrom().

#define NPY_ARRAY_F_CONTIGUOUS   0x0002
Set if array is a contiguous Fortran array: the first index varies the fastest in memory (strides array is reverse of C-contiguous array)
This flag may be requested in constructor functions. This flag may be tested for in PyArray_FLAGS(arr).

Referenced by _UpdateContiguousFlags(), array_setstate(), prepare_ufunc_output(), PyArray_NewFlagsObject(), and PyArray_UpdateFlags().

Value:
(NPY_ARRAY_F_CONTIGUOUS | \
                                NPY_ARRAY_BEHAVED)
Value:
(NPY_ARRAY_F_CONTIGUOUS | \
                                NPY_ARRAY_ALIGNED)
#define NPY_ARRAY_FORCECAST   0x0010
An array never has the next four set; they're only used as parameter flags to the various FromAny functions
This flag may be requested in constructor functions.
Cause a cast to occur regardless of whether or not it is safe.

Referenced by array_imag_get().

Value:
(NPY_ARRAY_CARRAY | \
                                NPY_ARRAY_UPDATEIFCOPY)
Value:
(NPY_ARRAY_FARRAY | \
                                NPY_ARRAY_UPDATEIFCOPY)
#define NPY_ARRAY_NOTSWAPPED   0x0200
Array data has the native endianness
This flag may be requested in constructor functions.
#define NPY_ARRAY_OWNDATA   0x0004
Note: all 0-d arrays are C_CONTIGUOUS and F_CONTIGUOUS. If a 1-d array is C_CONTIGUOUS it is also F_CONTIGUOUS. Arrays with more then one dimension can be C_CONTIGUOUS and F_CONTIGUOUS at the same time if they have either zero or one element. If NPY_RELAXED_STRIDES_CHECKING is set, a higher dimensional array is always C_CONTIGUOUS and F_CONTIGUOUS if it has zero elements and the array is contiguous if ndarray.squeeze() is contiguous. I.e. dimensions for which <cite>ndarray.shape[dimension] == 1</cite> are ignored.
If set, the array owns the data: it will be free'd when the array is deleted.
This flag may be tested for in PyArray_FLAGS(arr).

Referenced by PyArray_CastScalarDirect(), and PyArray_NewFlagsObject().

Value:
(NPY_ARRAY_C_CONTIGUOUS | \
                                NPY_ARRAY_F_CONTIGUOUS | \
                                NPY_ARRAY_ALIGNED)

Referenced by NpyIter_GetShape().

#define NPY_ARRAY_UPDATEIFCOPY   0x1000
If this flag is set, then base contains a pointer to an array of the same size that should be updated with the current contents of this array when this array is deallocated
This flag may be requested in constructor functions. This flag may be tested for in PyArray_FLAGS(arr).

Referenced by PyArray_ArgMax(), and PyArray_TakeFrom().

#define NPY_ARRAY_WRITEABLE   0x0400
Array data is writeable
This flag may be requested in constructor functions. This flag may be tested for in PyArray_FLAGS(arr).

Referenced by NpyIter_GetShape(), and PyArray_UpdateFlags().

#define NPY_AUXDATA_CLONE (   auxdata)    ((auxdata)->clone(auxdata))

Referenced by NpyIter_MultiNew().

#define NPY_BEGIN_THREADS_DEF   PyThreadState *_save=NULL;
the variable is used in some places, so always define it

Referenced by PyArray_ArgMax(), PyArray_TakeFrom(), PyArray_TransferMaskedStridedToNDim(), raw_array_assign_array(), and raw_array_assign_scalar().

#define NPY_BEGIN_THREADS_DESCR (   dtype)

Referenced by PyArray_ArgMax(), and PyArray_TakeFrom().

#define NPY_BEGIN_THREADS_THRESHOLDED (   loop_size)

Referenced by raw_array_assign_scalar().

#define NPY_BIG   '>'
#define NPY_BUFSIZE   8192
#define NPY_DATETIME_MAX_ISO8601_STRLEN   (21+3*5+1+3*6+6+1)
Upper bound on the length of a DATETIME ISO 8601 string
YEAR: 21 (64-bit year) MONTH: 3 DAY: 3 HOURS: 3 MINUTES: 3 SECONDS: 3 ATTOSECONDS: 1 + 3*6 TIMEZONE: 5 NULL TERMINATOR: 1
NOTE: With the NPY_FR_B gap for 1.6 ABI compatibility, NPY_DATETIME_NUMUNITS
is technically one more than the actual number of units.
The default array type

Referenced by _is_default_descr().

Use the keyword NPY_DEPRECATED_INCLUDES to ensure that the header files npy_*_*_deprecated_api.h are only included from here and nowhere else.

Referenced by _divide().

Referenced by npy_fallocate().

#define NPY_END_THREADS_DESCR (   dtype)

Referenced by PyArray_ArgMax().

#define NPY_ERR (   str)    fprintf(stderr, #str); fflush(stderr);
#define NPY_ERR2 (   str)    fprintf(stderr, str); fflush(stderr);
#define NPY_FEATURE_VERSION   NPY_API_VERSION
Minor API version. This number is increased whenever a change is made to the C-API -- whether it breaks binary compatibility or not. Some changes, such as adding a function pointer to the end of the function table, can be made without breaking binary compatibility. In this case, only the NPY_FEATURE_VERSION (not NPY_VERSION) would be increased. Whenever binary compatibility is broken, both NPY_VERSION and NPY_FEATURE_VERSION should be increased.
#define NPY_FROM_FIELDS
Value:
(NPY_NEEDS_INIT | NPY_LIST_PICKLE | \
                            NPY_ITEM_REFCOUNT | NPY_NEEDS_PYAPI)
These are inherited for global data-type if any data-types in the
field have them
#define NPY_IGNORE   '|'
#define NPY_ITEM_HASOBJECT   0x01
Same as needing REFCOUNT
#define NPY_ITEM_IS_POINTER   0x04
The item is a POINTER
#define NPY_ITEM_REFCOUNT   0x01
The item must be reference counted when it is inserted or extracted.
#define NPY_ITER_ALIGNED   0x00100000
#define NPY_ITER_ALLOCATE   0x01000000
Allocate the operand if it is NULL

Referenced by apply_business_day_count(), business_day_offset(), and PyUFunc_SetUsesArraysAsData().

#define NPY_ITER_ARRAYMASK   0x20000000
This array is the mask for all WRITEMASKED operands
#define NPY_ITER_BUFFERED   0x00000200
#define NPY_ITER_C_INDEX   0x00000001
  • Global flags that may be passed to the iterator constructors **
Track an index representing C order

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_COMMON_DTYPE   0x00000010
Convert all the operands to a common data type

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_CONTIG   0x00200000
The operand's data must be contiguous (within the inner loop)
#define NPY_ITER_COPY   0x00400000
The operand may be copied to satisfy requirements
#define NPY_ITER_DELAY_BUFALLOC   0x00000800
Delay allocation of buffers until first Reset* call

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_DONT_NEGATE_STRIDES   0x00001000
When NPY_KEEPORDER is specified, disable reversing negative-stride axes
#define NPY_ITER_EXTERNAL_LOOP   0x00000008
User code external to the iterator does the 1-dimensional innermost loop

Referenced by apply_business_day_count(), business_day_offset(), and NpyIter_GlobalFlagsConverter().

#define NPY_ITER_F_INDEX   0x00000002
Track an index representing Fortran order

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_GLOBAL_FLAGS   0x0000ffff
#define NPY_ITER_GROWINNER   0x00000400
When buffering is enabled, grows the inner loop if possible

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_MULTI_INDEX   0x00000004
Track a multi-index

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_NBO   0x00080000
The operand's data must be in native byte order
#define NPY_ITER_NO_BROADCAST   0x08000000
Require that the dimension match the iterator dimensions exactly

Referenced by PyUFunc_SetUsesArraysAsData().

#define NPY_ITER_NO_SUBTYPE   0x02000000
If an operand is allocated, don't use any subtype

Referenced by PyUFunc_SetUsesArraysAsData().

#define NPY_ITER_PER_OP_FLAGS   0xffff0000
#define NPY_ITER_RANGED   0x00000100
Enables sub-range iteration

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_READONLY   0x00020000
The operand will only be read from

Referenced by apply_business_day_count(), business_day_offset(), and check_for_trivial_loop().

#define NPY_ITER_READWRITE   0x00010000
  • Per-operand flags that may be passed to the iterator constructors **
The operand will be read from and written to

Referenced by check_for_trivial_loop().

#define NPY_ITER_REDUCE_OK   0x00000080
Permits reductions (size-0 stride with dimension size > 1)

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_REFS_OK   0x00000020
Operands may hold references, requiring API access during iteration

Referenced by NpyIter_GlobalFlagsConverter().

#define NPY_ITER_UPDATEIFCOPY   0x00800000
The operand may be copied with UPDATEIFCOPY to satisfy requirements
#define NPY_ITER_VIRTUAL   0x04000000
This is a virtual array slot, operand is NULL but temporary data is there
#define NPY_ITER_WRITEMASKED   0x10000000
A mask is being used on this array, affects buffer -> array copy
#define NPY_ITER_WRITEONLY   0x00040000
#define NPY_ITER_ZEROSIZE_OK   0x00000040
Zero-sized operands should be permitted, iteration checks IterSize for 0

Referenced by apply_business_day_count(), business_day_offset(), and NpyIter_GlobalFlagsConverter().

#define NPY_LIST_PICKLE   0x02
Convert to list for pickling

Referenced by PyArray_ToList().

#define NPY_LITTLE   '<'
#define NPY_MAX_BUFSIZE   (((int)sizeof(npy_cdouble))*1000000)
#define NPY_MAXDIMS   32
There are several places in the code where an array of dimensions is allocated statically. This is the size of that static allocation.
The array creation itself could have arbitrary dimensions but all the places where static allocation is used would need to be changed to dynamic (including inside of several structures)

Referenced by _bad_strides(), _putzero(), _strings_richcompare(), allocate_reduce_result(), arraymultiter_dealloc(), get_decsrcref_transfer_function(), NpyIter_GetShape(), PyArray_ArgMax(), PyArray_CanCoerceScalar(), PyArray_EquivTypenums(), PyArray_MapIterReset(), PyArray_TakeFrom(), raw_array_assign_array(), and raw_array_assign_scalar().

#define NPY_MIN_BUFSIZE   ((int)sizeof(npy_cdouble))
Size of internal buffers used for alignment Make BUFSIZE a multiple of sizeof(npy_cdouble) -- usually 16 so that ufunc buffers are aligned
#define NPY_NATBYTE   NPY_LITTLE
#define NPY_NATIVE   '='
#define NPY_NEEDS_INIT   0x08
memory needs to be initialized for this data-type
#define NPY_NEEDS_PYAPI   0x10
operations need Python C-API so don't give-up thread.
#define NPY_NO_EXPORT   NPY_VISIBILITY_HIDDEN

Referenced by npyiter_seq_ass_slice().

#define NPY_NSEARCHSIDES   (NPY_SEARCHRIGHT + 1)
#define NPY_NSELECTS   (NPY_INTROSELECT + 1)
#define NPY_NSORTS   (NPY_MERGESORT + 1)
#define NPY_NUM_FLOATTYPE   3
How many floating point types are there (excluding half)
Value:
(NPY_LIST_PICKLE | NPY_USE_GETITEM | \
                                NPY_ITEM_IS_POINTER | NPY_ITEM_REFCOUNT | \
                                NPY_NEEDS_INIT | NPY_NEEDS_PYAPI)
#define NPY_OPPBYTE   NPY_BIG
#define NPY_PRIORITY   0.0
basetype array priority

Referenced by _ctype_negative().

#define NPY_SCALAR_PRIORITY   -1000000.0
default scalar priority
#define NPY_STRINGIFY (   x)    #x
#define NPY_SUBTYPE_PRIORITY   1.0
default subtype priority
#define NPY_SWAP   's'
#define NPY_TOSTRING (   x)    NPY_STRINGIFY(x)
#define NPY_USE_GETITEM   0x20
Use f.getitem when extracting elements of this data-type
#define NPY_USE_PYMEM   1
Macros to define how array, and dimension/strides data is allocated.
Data buffer - PyDataMem_NEW/FREE/RENEW are in multiarraymodule.c
#define NPY_USE_SETITEM   0x40
Use f.setitem when setting creating 0-d array from this data-type.
#define NPY_VERSION   NPY_ABI_VERSION
Binary compatibility version number. This number is increased whenever the C-API is changed such that binary compatibility is broken, i.e. whenever a recompile of extension modules is needed.
#define PyArray_BASE (   obj)    (((PyArrayObject_fields *)(obj))->base)
#define PyArray_BYTES (   obj)    (((PyArrayObject_fields *)(obj))->data)
#define PyArray_CEQ (   p,
 
)    (((p).real==(q).real) && ((p).imag == (q).imag))
#define PyArray_CGE (   p,
 
)
Value:
((((p).real==(q).real) ? ((p).imag >= (q).imag) : \
                               ((p).real >= (q).real)))
#define PyArray_CGT (   p,
 
)
Value:
((((p).real==(q).real) ? ((p).imag > (q).imag) : \
                               ((p).real > (q).real)))

Referenced by _argmin().

#define PyArray_CHKFLAGS (   m,
  FLAGS 
)    ((((PyArrayObject_fields *)(m))->flags & (FLAGS)) == (FLAGS))

Referenced by _zerofill().

#define PyArray_CLE (   p,
 
)
Value:
((((p).real==(q).real) ? ((p).imag <= (q).imag) : \
                               ((p).real <= (q).real)))
#define PyArray_CLT (   p,
 
)
Value:
((((p).real==(q).real) ? ((p).imag < (q).imag) : \
                               ((p).real < (q).real)))
#define PyArray_CNE (   p,
 
)    (((p).real!=(q).real) || ((p).imag != (q).imag))
#define PyArray_FLAGSWAP (   m,
  flags 
)
Value:
(PyArray_CHKFLAGS(m, flags) &&       \
                                    PyArray_ISNOTSWAPPED(m))
#define PyArray_FORTRAN_IF (   m)
Value:
((PyArray_CHKFLAGS(m, NPY_ARRAY_F_CONTIGUOUS) ? \
                               NPY_ARRAY_F_CONTIGUOUS : 0))

Referenced by array_imag_get().

#define PyArray_GETITEM (   obj,
  itemptr 
)
Value:
PyArray_DESCR(obj)->f->getitem((char *)(itemptr), \
                                     (PyArrayObject *)(obj))
#define PyArray_HASFIELDS (   obj)    PyDataType_HASFIELDS(PyArray_DESCR(obj))

Referenced by STRING_copyswapn().

Referenced by npy_strtoull().

#define PyArray_ISBOOL (   obj)    PyTypeNum_ISBOOL(PyArray_TYPE(obj))
#define PyArray_ISBYTESWAPPED (   m)    (!PyArray_ISNOTSWAPPED(m))
C API: consists of Macros and functions. The MACROS are defined here.
#define PyArray_ISDATETIME (   obj)    PyTypeNum_ISDATETIME(PyArray_TYPE(obj))
#define PyArray_ISEXTENDED (   obj)    PyTypeNum_ISEXTENDED(PyArray_TYPE(obj))
#define PyArray_ISFLEXIBLE (   obj)    PyTypeNum_ISFLEXIBLE(PyArray_TYPE(obj))
#define PyArray_ISFLOAT (   obj)    PyTypeNum_ISFLOAT(PyArray_TYPE(obj))

Referenced by array_remainder().

#define PyArray_ISNBO (   arg)    ((arg) != NPY_OPPBYTE)
#define PyArray_ISNOTSWAPPED (   m)    PyArray_ISNBO(PyArray_DESCR(m)->byteorder)

Referenced by npy_strtoull().

#define PyArray_ISNUMBER (   obj)    PyTypeNum_ISNUMBER(PyArray_TYPE(obj))
#define PyArray_ISOBJECT (   obj)    PyTypeNum_ISOBJECT(PyArray_TYPE(obj))
#define PyArray_ISONESEGMENT (   m)
Value:
(PyArray_NDIM(m) == 0 || \
                             PyArray_CHKFLAGS(m, NPY_ARRAY_C_CONTIGUOUS) || \
                             PyArray_CHKFLAGS(m, NPY_ARRAY_F_CONTIGUOUS))
All sorts of useful ways to look into a PyArrayObject. It is recommended to use PyArrayObject * objects instead of always casting from PyObject *, for improved type checking.

System Message: WARNING/2 (<string>, line 1); backlink Inline emphasis start-string without end-string.
In many cases here the macro versions of the accessors are deprecated, but can't be immediately changed to inline functions because the preexisting macros accept PyObject * and do automatic casts. Inline functions accepting PyArrayObject * provides for some compile-time checking of correctness when working with these objects in C.

Referenced by array_getsegcount(), and array_setfield().

#define PyArray_ISPYTHON (   obj)    PyTypeNum_ISPYTHON(PyArray_TYPE(obj))
#define PyArray_ISSIGNED (   obj)    PyTypeNum_ISSIGNED(PyArray_TYPE(obj))
#define PyArray_ISSTRING (   obj)    PyTypeNum_ISSTRING(PyArray_TYPE(obj))
#define PyArray_ISUNSIGNED (   obj)    PyTypeNum_ISUNSIGNED(PyArray_TYPE(obj))
#define PyArray_ISUSERDEF (   obj)    PyTypeNum_ISUSERDEF(PyArray_TYPE(obj))
#define PyArray_ISVARIABLE (   obj)    PyTypeNum_ISFLEXIBLE(PyArray_TYPE(obj))
FIXME: This should check for a flag on the data-type that states whether or not it is variable length. Because the ISFLEXIBLE check is hard-coded to the built-in data-types.

Referenced by _zerofill().

#define PyArray_ITEMSIZE (   obj)    (((PyArrayObject_fields *)(obj))->descr->elsize)
#define PyArray_ITER_DATA (   it)    ((void *)(_PyAIT(it)->dataptr))
#define PyArray_ITER_GOTO (   it,
  destination 
)
Value:
do { \
        int __npy_i; \
        _PyAIT(it)->index = 0; \
        _PyAIT(it)->dataptr = PyArray_BYTES(_PyAIT(it)->ao); \
        for (__npy_i = _PyAIT(it)->nd_m1; __npy_i>=0; __npy_i--) { \
                if (destination[__npy_i] < 0) { \
                        destination[__npy_i] += \
                                _PyAIT(it)->dims_m1[__npy_i]+1; \
                } \
                _PyAIT(it)->dataptr += destination[__npy_i] * \
                        _PyAIT(it)->strides[__npy_i]; \
                _PyAIT(it)->coordinates[__npy_i] = \
                        destination[__npy_i]; \
                _PyAIT(it)->index += destination[__npy_i] * \
                        ( __npy_i==_PyAIT(it)->nd_m1 ? 1 : \
                          _PyAIT(it)->dims_m1[__npy_i+1]+1) ; \
        } \
} while (0)
#define PyArray_ITER_GOTO1D (   it,
  ind 
)
Value:
do { \
        int __npy_i; \
        npy_intp __npy_ind = (npy_intp) (ind); \
        if (__npy_ind < 0) __npy_ind += _PyAIT(it)->size; \
        _PyAIT(it)->index = __npy_ind; \
        if (_PyAIT(it)->nd_m1 == 0) { \
                _PyAIT(it)->dataptr = PyArray_BYTES(_PyAIT(it)->ao) + \
                        __npy_ind * _PyAIT(it)->strides[0]; \
        } \
        else if (_PyAIT(it)->contiguous) \
                _PyAIT(it)->dataptr = PyArray_BYTES(_PyAIT(it)->ao) + \
                        __npy_ind * PyArray_DESCR(_PyAIT(it)->ao)->elsize; \
        else { \
                _PyAIT(it)->dataptr = PyArray_BYTES(_PyAIT(it)->ao); \
                for (__npy_i = 0; __npy_i<=_PyAIT(it)->nd_m1; \
                     __npy_i++) { \
                        _PyAIT(it)->dataptr += \
                                (__npy_ind / _PyAIT(it)->factors[__npy_i]) \
                                * _PyAIT(it)->strides[__npy_i]; \
                        __npy_ind %= _PyAIT(it)->factors[__npy_i]; \
                } \
        } \
} while (0)
#define PyArray_ITER_NEXT (   it)
Value:
do { \
        _PyAIT(it)->index++; \
        if (_PyAIT(it)->nd_m1 == 0) { \
                _PyArray_ITER_NEXT1(_PyAIT(it)); \
        } \
        else if (_PyAIT(it)->contiguous) \
                _PyAIT(it)->dataptr += PyArray_DESCR(_PyAIT(it)->ao)->elsize; \
        else if (_PyAIT(it)->nd_m1 == 1) { \
                _PyArray_ITER_NEXT2(_PyAIT(it)); \
        } \
        else { \
                int __npy_i; \
                for (__npy_i=_PyAIT(it)->nd_m1; __npy_i >= 0; __npy_i--) { \
                        if (_PyAIT(it)->coordinates[__npy_i] < \
                            _PyAIT(it)->dims_m1[__npy_i]) { \
                                _PyAIT(it)->coordinates[__npy_i]++; \
                                _PyAIT(it)->dataptr += \
                                        _PyAIT(it)->strides[__npy_i]; \
                                break; \
                        } \
                        else { \
                                _PyAIT(it)->coordinates[__npy_i] = 0; \
                                _PyAIT(it)->dataptr -= \
                                        _PyAIT(it)->backstrides[__npy_i]; \
                        } \
                } \
        } \
} while (0)

Referenced by _loop1d_list_free(), array_setfield(), iter_subscript_Bool(), name(), PyArray_INCREF(), PyArray_RemoveSmallest(), and test_pydatamem_seteventhook_start().

#define PyArray_ITER_NOTDONE (   it)    (_PyAIT(it)->index < _PyAIT(it)->size)
#define PyArray_ITER_RESET (   it)
Value:
do { \
        _PyAIT(it)->index = 0; \
        _PyAIT(it)->dataptr = PyArray_BYTES(_PyAIT(it)->ao); \
        memset(_PyAIT(it)->coordinates, 0, \
               (_PyAIT(it)->nd_m1+1)*sizeof(npy_intp)); \
} while (0)
#define PyArray_malloc   PyMem_Malloc
numpy sometimes calls PyArray_malloc() with the GIL released. On Python
3.3 and older, it was safe to call PyMem_Malloc() with the GIL released. On Python 3.4 and newer, it's better to use PyMem_RawMalloc() to be able to use tracemalloc. On Python 3.6, calling PyMem_Malloc() with the GIL released is now a fatal error in debug mode.

Referenced by _contig_to_contig_n_to_n(), _strided_to_strided_copy_references(), _strided_to_strided_truncate_copy(), _wrap_copy_swap_data_free(), arraymultiter_index_get(), PyArray_IterNew(), PyArray_MapIterReset(), and ufunc_frompyfunc().

#define PyArray_MAX (   a,
 
)    (((a)>(b))?(a):(b))
buffer stress test size:
#define NPY_BUFSIZE 17

Referenced by iter_richcompare(), and PyArray_Arange().

#define PyArray_MIN (   a,
 
)    (((a)<(b))?(a):(b))
#define PyArray_MultiIter_DATA (   multi,
 
)    ((void *)(_PyMIT(multi)->iters[i]->dataptr))
#define PyArray_MultiIter_GOTO (   multi,
  dest 
)
Value:
do {                            \
        int __npy_mi;                                                       \
        for (__npy_mi=0; __npy_mi < _PyMIT(multi)->numiter; __npy_mi++) {   \
                PyArray_ITER_GOTO(_PyMIT(multi)->iters[__npy_mi], dest);    \
        }                                                                   \
        _PyMIT(multi)->index = _PyMIT(multi)->iters[0]->index;              \
} while (0)
#define PyArray_MultiIter_GOTO1D (   multi,
  ind 
)
Value:
do {                          \
        int __npy_mi;                                                      \
        for (__npy_mi=0; __npy_mi < _PyMIT(multi)->numiter; __npy_mi++) {  \
                PyArray_ITER_GOTO1D(_PyMIT(multi)->iters[__npy_mi], ind);  \
        }                                                                  \
        _PyMIT(multi)->index = _PyMIT(multi)->iters[0]->index;             \
} while (0)
#define PyArray_MultiIter_NEXT (   multi)
Value:
do {                                    \
        int __npy_mi;                                                         \
        _PyMIT(multi)->index++;                                               \
        for (__npy_mi=0; __npy_mi < _PyMIT(multi)->numiter;   __npy_mi++) {   \
                PyArray_ITER_NEXT(_PyMIT(multi)->iters[__npy_mi]);            \
        }                                                                     \
} while (0)
#define PyArray_MultiIter_NEXTi (   multi,
 
)    PyArray_ITER_NEXT(_PyMIT(multi)->iters[i])
#define PyArray_MultiIter_NOTDONE (   multi)    (_PyMIT(multi)->index < _PyMIT(multi)->size)
#define PyArray_MultiIter_RESET (   multi)
Value:
do {                                   \
        int __npy_mi;                                                         \
        _PyMIT(multi)->index = 0;                                             \
        for (__npy_mi=0; __npy_mi < _PyMIT(multi)->numiter;  __npy_mi++) {    \
                PyArray_ITER_RESET(_PyMIT(multi)->iters[__npy_mi]);           \
        }                                                                     \
} while (0)
#define PyArray_realloc   PyMem_Realloc
#define PyArray_SAFEALIGNEDCOPY (   obj)    (PyArray_ISALIGNED(obj) && !PyArray_ISVARIABLE(obj))
#define PyArray_SETITEM (   obj,
  itemptr,
 
)
Value:
PyArray_DESCR(obj)->f->setitem((PyObject *)(v), \
                                     (char *)(itemptr), \
                                     (PyArrayObject *)(obj))

Referenced by array_subscript().

#define PyArray_STRIDE (   obj,
 
)    (PyArray_STRIDES(obj)[n])

Referenced by _append_str().

#define PyArray_TYPE (   obj)    (((PyArrayObject_fields *)(obj))->descr->type_num)
#define PyArrayIter_Check (   op)    PyObject_TypeCheck(op, &PyArrayIter_Type)
Iterator API
#define PyDataType_FLAGCHK (   dtype,
  flag 
)    (((dtype)->flags & (flag)) == (flag))

Referenced by PyArray_ToList().

#define PyDataType_HASFIELDS (   obj)    (((PyArray_Descr *)(obj))->names != NULL)
#define PyDataType_HASSUBARRAY (   dtype)    ((dtype)->subarray != NULL)
#define PyDataType_ISBOOL (   obj)    PyTypeNum_ISBOOL(_PyADt(obj))
#define PyDataType_ISCOMPLEX (   obj)    PyTypeNum_ISCOMPLEX(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISDATETIME (   obj)    PyTypeNum_ISDATETIME(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISEXTENDED (   obj)    PyTypeNum_ISEXTENDED(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISFLEXIBLE (   obj)    PyTypeNum_ISFLEXIBLE(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISFLOAT (   obj)    PyTypeNum_ISFLOAT(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISINTEGER (   obj)    PyTypeNum_ISINTEGER(((PyArray_Descr*)(obj))->type_num )
#define PyDataType_ISNOTSWAPPED (   d)    PyArray_ISNBO(((PyArray_Descr *)(d))->byteorder)
#define PyDataType_ISNUMBER (   obj)    PyTypeNum_ISNUMBER(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISOBJECT (   obj)    PyTypeNum_ISOBJECT(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISPYTHON (   obj)    PyTypeNum_ISPYTHON(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISSIGNED (   obj)    PyTypeNum_ISSIGNED(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISSTRING (   obj)    PyTypeNum_ISSTRING(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISUNSIGNED (   obj)    PyTypeNum_ISUNSIGNED(((PyArray_Descr*)(obj))->type_num)
#define PyDataType_ISUSERDEF (   obj)    PyTypeNum_ISUSERDEF(((PyArray_Descr*)(obj))->type_num)
#define PyDimMem_FREE (   ptr)    PyArray_free(ptr)

Referenced by OBJECT_setitem().

#define PyDimMem_NEW (   size)    ((npy_intp *)PyArray_malloc(size*sizeof(npy_intp)))
Dimensions and strides

Referenced by array_setstate().

#define PyDimMem_RENEW (   ptr,
  size 
)    ((npy_intp *)PyArray_realloc(ptr,size*sizeof(npy_intp)))
#define PyTypeNum_ISBOOL (   type)    ((type) == NPY_BOOL)
#define PyTypeNum_ISCOMPLEX (   type)
Value:
(((type) >= NPY_CFLOAT) &&   \
                                ((type) <= NPY_CLONGDOUBLE))
#define PyTypeNum_ISDATETIME (   type)
Value:
(((type) >=NPY_DATETIME) &&  \
                                    ((type) <=NPY_TIMEDELTA))

Referenced by PyUFunc_MultiplicationTypeResolver().

#define PyTypeNum_ISEXTENDED (   type)
Value:
(PyTypeNum_ISFLEXIBLE(type) ||  \
                                    PyTypeNum_ISUSERDEF(type))
#define PyTypeNum_ISFLEXIBLE (   type)
Value:
(((type) >=NPY_STRING) &&  \
                                    ((type) <=NPY_VOID))
#define PyTypeNum_ISFLOAT (   type)
Value:
((((type) >= NPY_FLOAT) && \
                              ((type) <= NPY_LONGDOUBLE)) || \
                              ((type) == NPY_HALF))

Referenced by PyUFunc_MultiplicationTypeResolver().

#define PyTypeNum_ISINTEGER (   type)
Value:
(((type) >= NPY_BYTE) &&     \
                                ((type) <= NPY_ULONGLONG))

Referenced by PyUFunc_MultiplicationTypeResolver().

#define PyTypeNum_ISNUMBER (   type)
Value:
(((type) <= NPY_CLONGDOUBLE) || \
                                  ((type) == NPY_HALF))
#define PyTypeNum_ISOBJECT (   type)    ((type) == NPY_OBJECT)
#define PyTypeNum_ISPYTHON (   type)
Value:
(((type) == NPY_LONG) ||      \
                                  ((type) == NPY_DOUBLE) ||    \
                                  ((type) == NPY_CDOUBLE) ||   \
                                  ((type) == NPY_BOOL) ||      \
                                  ((type) == NPY_OBJECT ))
#define PyTypeNum_ISSIGNED (   type)
Value:
(((type) == NPY_BYTE) ||      \
                               ((type) == NPY_SHORT) ||        \
                               ((type) == NPY_INT) ||          \
                               ((type) == NPY_LONG) ||         \
                               ((type) == NPY_LONGLONG))
#define PyTypeNum_ISSTRING (   type)
Value:
(((type) == NPY_STRING) ||    \
                                  ((type) == NPY_UNICODE))
#define PyTypeNum_ISUNSIGNED (   type)
Value:
(((type) == NPY_UBYTE) ||   \
                                 ((type) == NPY_USHORT) ||     \
                                 ((type) == NPY_UINT) ||       \
                                 ((type) == NPY_ULONG) ||      \
                                 ((type) == NPY_ULONGLONG))
#define PyTypeNum_ISUSERDEF (   type)
Value:
(((type) >= NPY_USERDEF) && \
                                   ((type) < NPY_USERDEF+     \
                                    NPY_NUMUSERTYPES))

Referenced by ufunc_loop_matches().


Typedef Documentation

type of the function which translates a set of coordinates to a pointer to the data
typedef struct NpyAuxData_tag NpyAuxData

NumPy Auxiliary Data for inner loops, sort functions, etc.

System Message: WARNING/2 (<string>, line 1)
Title overline too short.

 NumPy Auxiliary Data for inner loops, sort functions, etc.
 
When creating an auxiliary data struct, this should always appear as the first member, like this:

typedef struct {
NpyAuxData base; double constant;
System Message: WARNING/2 (<string>, line 7) Definition list ends without a blank line; unexpected unindent.
} constant_multiplier_aux_data;
typedef void( NpyAuxData_FreeFunc)(NpyAuxData *)
Function pointers for freeing or cloning auxiliary data
typedef struct NpyIter_InternalOnly NpyIter

The nditer object, added in 1.6

The actual structure of the iterator is an internal detail
typedef void( NpyIter_GetMultiIndexFunc)(NpyIter *iter, npy_intp *outcoords)
typedef int( NpyIter_IterNextFunc)(NpyIter *iter)
Iterator function pointers that may be specialized
typedef int( PyArray_ArgFunc)(void *, npy_intp, npy_intp *, void *)
typedef int( PyArray_ArgPartitionFunc)(void *, npy_intp *, npy_intp, npy_intp, npy_intp *, npy_intp *, void *)
typedef int( PyArray_ArgSortFunc)(void *, npy_intp *, npy_intp, void *)
typedef int( PyArray_CompareFunc)(const void *, const void *, void *)
These assume aligned and notswapped data -- a buffer will be used before or contiguous data will be obtained
typedef void( PyArray_CopySwapFunc)(void *, void *, int, void *)
typedef void( PyArray_CopySwapNFunc)(void *, npy_intp, void *, npy_intp, npy_intp, int, void *)
typedef struct _PyArray_Descr PyArray_Descr
typedef void( PyArray_DotFunc)(void *, npy_intp, void *, npy_intp, void *, npy_intp, void *)
typedef void( PyArray_FastClipFunc)(void *in, npy_intp n_in, void *min, void *max, void *out)
typedef void( PyArray_FastPutmaskFunc)(void *in, void *mask, npy_intp n_in, void *values, npy_intp nv)
typedef int( PyArray_FastTakeFunc)(void *dest, void *src, npy_intp *indarray, npy_intp nindarray, npy_intp n_outer, npy_intp m_middle, npy_intp nelem, NPY_CLIPMODE clipmode)
typedef int( PyArray_FillFunc)(void *, npy_intp, void *)
typedef int( PyArray_FillWithScalarFunc)(void *, npy_intp, void *, void *)
typedef int( PyArray_FinalizeFunc)(PyArrayObject *, PyObject *)
typedef int( PyArray_FromStrFunc)(char *s, void *dptr, char **endptr, struct _PyArray_Descr *)
typedef PyObject*( PyArray_GetItemFunc)(void *, void *)
These must deal with unaligned and swapped data if necessary
typedef npy_bool( PyArray_NonzeroFunc)(void *, void *)
typedef int( PyArray_PartitionFunc)(void *, npy_intp, npy_intp, npy_intp *, npy_intp *, void *)
typedef int( PyArray_ScalarKindFunc)(void *)
typedef int( PyArray_ScanFunc)(FILE *fp, void *dptr, char *ignore, struct _PyArray_Descr *)
XXX the ignore argument should be removed next time the API version is bumped. It used to be the separator.
typedef int( PyArray_SetItemFunc)(PyObject *, void *, void *)
typedef int( PyArray_SortFunc)(void *, npy_intp, void *)
typedef void( PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
Array Flags Object

Basic iterator object

FWD declaration
To hide the implementation details, we only expose the Python struct HEAD.
Can't put this in npy_deprecated_api.h like the others. PyArrayObject field access is deprecated as of NumPy 1.7.
The main array object structure.
It has been recommended to use the inline functions defined below (PyArray_DATA and friends) to access fields here for a number of releases. Direct access to the members themselves is deprecated. To ensure that your code does not use deprecated access, #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION (or NPY_1_8_API_VERSION or higher as required).
This struct will be moved to a private header in a future release
typedef void( PyDataMem_EventHookFunc)(void *inp, void *outp, size_t size, void *user_data)
This is a function for hooking into the PyDataMem_NEW/FREE/RENEW functions. See the documentation for PyDataMem_SetEventHook.

Enumeration Type Documentation

anonymous enum
Enumerator:
NPY_NEIGHBORHOOD_ITER_ZERO_PADDING 
NPY_NEIGHBORHOOD_ITER_ONE_PADDING 
NPY_NEIGHBORHOOD_ITER_CONSTANT_PADDING 
NPY_NEIGHBORHOOD_ITER_CIRCULAR_PADDING 
NPY_NEIGHBORHOOD_ITER_MIRROR_PADDING 
Business day conventions for mapping invalid business days to valid business days.
Enumerator:
NPY_BUSDAY_FORWARD 
Go forward in time to the following business day.
NPY_BUSDAY_FOLLOWING 
NPY_BUSDAY_BACKWARD 
Go backward in time to the preceding business day.
NPY_BUSDAY_PRECEDING 
NPY_BUSDAY_MODIFIEDFOLLOWING 
Go forward in time to the following business day, unless it crosses a month boundary, in which case go backward
NPY_BUSDAY_MODIFIEDPRECEDING 
Go backward in time to the preceding business day, unless it crosses a month boundary, in which case go forward.
NPY_BUSDAY_NAT 
Produce a NaT for non-business days.
NPY_BUSDAY_RAISE 
Raise an exception for non-business days.
For specifying allowed casting in operations which support it
Enumerator:
NPY_NO_CASTING 
Only allow identical types
NPY_EQUIV_CASTING 
Allow identical and byte swapped types
NPY_SAFE_CASTING 
Only allow safe casts
NPY_SAME_KIND_CASTING 
Allow safe casts or casts within the same kind
NPY_UNSAFE_CASTING 
Allow any casts
Enumerator:
NPY_CLIP 
NPY_WRAP 
NPY_RAISE 
Enumerator:
NPY_FR_Y 
Years
NPY_FR_M 
Months
NPY_FR_W 
Weeks
NPY_FR_D 
Gap where 1.6 NPY_FR_B (value 3) was
Days
NPY_FR_h 
hours
NPY_FR_m 
minutes
NPY_FR_s 
seconds
NPY_FR_ms 
milliseconds
NPY_FR_us 
microseconds
NPY_FR_ns 
nanoseconds
NPY_FR_ps 
picoseconds
NPY_FR_fs 
femtoseconds
NPY_FR_as 
attoseconds
NPY_FR_GENERIC 
Generic, unbound units, can convert to anything
enum NPY_ORDER
For specifying array memory layout or iteration order
Enumerator:
NPY_ANYORDER 
Fortran order if inputs are all Fortran, C otherwise
NPY_CORDER 
C order
NPY_FORTRANORDER 
Fortran order
NPY_KEEPORDER 
An order as close to the inputs as possible
Enumerator:
NPY_NOSCALAR 
NPY_BOOL_SCALAR 
NPY_INTPOS_SCALAR 
NPY_INTNEG_SCALAR 
NPY_FLOAT_SCALAR 
NPY_COMPLEX_SCALAR 
NPY_OBJECT_SCALAR 
Enumerator:
NPY_SEARCHLEFT 
NPY_SEARCHRIGHT 
Enumerator:
NPY_INTROSELECT 
Enumerator:
NPY_QUICKSORT 
NPY_HEAPSORT 
NPY_MERGESORT 
These characters correspond to the array type and the struct module
Enumerator:
NPY_BOOLLTR 
NPY_BYTELTR 
NPY_UBYTELTR 
NPY_SHORTLTR 
NPY_USHORTLTR 
NPY_INTLTR 
NPY_UINTLTR 
NPY_LONGLTR 
NPY_ULONGLTR 
NPY_LONGLONGLTR 
NPY_ULONGLONGLTR 
NPY_HALFLTR 
NPY_FLOATLTR 
NPY_DOUBLELTR 
NPY_LONGDOUBLELTR 
NPY_CFLOATLTR 
NPY_CDOUBLELTR 
NPY_CLONGDOUBLELTR 
NPY_OBJECTLTR 
NPY_STRINGLTR 
NPY_STRINGLTR2 
NPY_UNICODELTR 
NPY_VOIDLTR 
NPY_DATETIMELTR 
NPY_TIMEDELTALTR 
NPY_CHARLTR 
NPY_INTPLTR 
No Descriptor, just a define -- this let's Python users specify an array of integers large enough to hold a pointer on the platform
NPY_UINTPLTR 
NPY_GENBOOLLTR 
These are for dtype 'kinds', not dtype 'typecodes' as the above are for.
NPY_SIGNEDLTR 
NPY_UNSIGNEDLTR 
NPY_FLOATINGLTR 
NPY_COMPLEXLTR 
enum NPY_TYPES
Enumerator:
NPY_BOOL 
NPY_BYTE 
NPY_UBYTE 
NPY_SHORT 
NPY_USHORT 
NPY_INT 
NPY_UINT 
NPY_LONG 
NPY_ULONG 
NPY_LONGLONG 
NPY_ULONGLONG 
NPY_FLOAT 
NPY_DOUBLE 
NPY_LONGDOUBLE 
NPY_CFLOAT 
NPY_CDOUBLE 
NPY_CLONGDOUBLE 
NPY_OBJECT 
NPY_STRING 
NPY_UNICODE 
NPY_VOID 
NPY_DATETIME 
New 1.6 types appended, may be integrated into the above in 2.0.
NPY_TIMEDELTA 
NPY_HALF 
NPY_NTYPES 
NPY_NOTYPE 
NPY_CHAR 
special flag
NPY_USERDEF 
leave room for characters
NPY_NTYPES_ABI_COMPATIBLE 
The number of types not including the new 1.6 types

Function Documentation

static NPY_INLINE void PyArray_CLEARFLAGS ( PyArrayObject arr,
int  flags 
) [static]
Clears the specified array flags. Does no checking, assumes you know what you're doing.

Referenced by _UpdateContiguousFlags(), array_nonzero(), PyArray_SetStringFunction(), and PyArray_UpdateFlags().

static NPY_INLINE PyArray_Descr* PyArray_DTYPE ( PyArrayObject arr) [static]

Referenced by allocate_reduce_result().

static NPY_INLINE void PyArray_ENABLEFLAGS ( PyArrayObject arr,
int  flags 
) [static]
Enables the specified array flags. Does no checking, assumes you know what you're doing.

Referenced by _UpdateContiguousFlags(), OBJECT_getitem(), and PyArray_UpdateFlags().

static NPY_INLINE npy_intp* PyArray_SHAPE ( PyArrayObject arr) [static]

Referenced by PyArray_Nonzero().

Neighborhood iterator API
General: those work for any mode