numpy 2.0.0
|
#include "numpyconfig.h"
#include "npy_common.h"
#include "npy_endian.h"
#include "npy_cpu.h"
#include "utils.h"
#include "_neighborhood_iterator_imp.h"
Go to the source code of this file.
Data Structures | |
struct | PyArray_Dims |
struct | PyArray_ArrFuncs |
struct | _PyArray_Descr |
struct | _arr_descr |
struct | PyArrayObject |
struct | PyArrayFlagsObject |
struct | PyArray_Chunk |
struct | PyArray_DatetimeMetaData |
struct | npy_datetimestruct |
struct | npy_timedeltastruct |
struct | PyArrayIterObject_tag |
struct | PyArrayMultiIterObject |
struct | PyArrayMapIterObject |
struct | PyArrayNeighborhoodIterObject |
struct | PyArrayInterface |
Defines | |
#define | NPY_NO_EXPORT static |
#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_METADATA_DTSTR "__frequency__" |
#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_NSEARCHSIDES (NPY_SEARCHRIGHT + 1) |
#define | NPY_NSCALARKINDS (NPY_OBJECT_SCALAR + 1) |
#define | NPY_DATETIME_NUMUNITS (NPY_FR_as + 1) |
#define | NPY_DATETIME_DEFAULTUNIT NPY_FR_us |
#define | NPY_STR_Y "Y" |
#define | NPY_STR_M "M" |
#define | NPY_STR_W "W" |
#define | NPY_STR_B "B" |
#define | NPY_STR_D "D" |
#define | NPY_STR_h "h" |
#define | NPY_STR_m "m" |
#define | NPY_STR_s "s" |
#define | NPY_STR_ms "ms" |
#define | NPY_STR_us "us" |
#define | NPY_STR_ns "ns" |
#define | NPY_STR_ps "ps" |
#define | NPY_STR_fs "fs" |
#define | NPY_STR_as "as" |
#define | NPY_SIZEOF_INTP NPY_SIZEOF_PY_INTPTR_T |
#define | NPY_SIZEOF_UINTP NPY_SIZEOF_PY_INTPTR_T |
#define | PY_SSIZE_T_MAX INT_MAX |
#define | PY_SSIZE_T_MIN INT_MIN |
#define | NPY_SSIZE_T_PYFMT "i" |
#define | constchar const char |
#define | PyIndex_Check(op) 0 |
#define | NPY_INTP NPY_INT |
#define | NPY_UINTP NPY_UINT |
#define | PyIntpArrType_Type PyIntArrType_Type |
#define | PyUIntpArrType_Type PyUIntArrType_Type |
#define | NPY_MAX_INTP NPY_MAX_INT |
#define | NPY_MIN_INTP NPY_MIN_INT |
#define | NPY_MAX_UINTP NPY_MAX_UINT |
#define | NPY_INTP_FMT "d" |
#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 | PyDataMem_NEW(size) ((char *)malloc(size)) |
#define | PyDataMem_FREE(ptr) free(ptr) |
#define | PyDataMem_RENEW(ptr, size) ((char *)realloc(ptr,size)) |
#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_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_AO PyArrayObject |
#define | fortran fortran_ |
#define | PyDataType_GetDatetimeMetaData(descr) |
#define | NPY_CONTIGUOUS 0x0001 |
#define | NPY_FORTRAN 0x0002 |
#define | NPY_C_CONTIGUOUS NPY_CONTIGUOUS |
#define | NPY_F_CONTIGUOUS NPY_FORTRAN |
#define | NPY_OWNDATA 0x0004 |
#define | NPY_FORCECAST 0x0010 |
#define | NPY_ENSURECOPY 0x0020 |
#define | NPY_ENSUREARRAY 0x0040 |
#define | NPY_ELEMENTSTRIDES 0x0080 |
#define | NPY_ALIGNED 0x0100 |
#define | NPY_NOTSWAPPED 0x0200 |
#define | NPY_WRITEABLE 0x0400 |
#define | NPY_UPDATEIFCOPY 0x1000 |
#define | NPY_ARR_HAS_DESCR 0x0800 |
#define | NPY_BEHAVED (NPY_ALIGNED | NPY_WRITEABLE) |
#define | NPY_BEHAVED_NS (NPY_ALIGNED | NPY_WRITEABLE | NPY_NOTSWAPPED) |
#define | NPY_CARRAY (NPY_CONTIGUOUS | NPY_BEHAVED) |
#define | NPY_CARRAY_RO (NPY_CONTIGUOUS | NPY_ALIGNED) |
#define | NPY_FARRAY (NPY_FORTRAN | NPY_BEHAVED) |
#define | NPY_FARRAY_RO (NPY_FORTRAN | NPY_ALIGNED) |
#define | NPY_DEFAULT NPY_CARRAY |
#define | NPY_IN_ARRAY NPY_CARRAY_RO |
#define | NPY_OUT_ARRAY NPY_CARRAY |
#define | NPY_INOUT_ARRAY (NPY_CARRAY | NPY_UPDATEIFCOPY) |
#define | NPY_IN_FARRAY NPY_FARRAY_RO |
#define | NPY_OUT_FARRAY NPY_FARRAY |
#define | NPY_INOUT_FARRAY (NPY_FARRAY | NPY_UPDATEIFCOPY) |
#define | NPY_UPDATE_ALL (NPY_CONTIGUOUS | NPY_FORTRAN | NPY_ALIGNED) |
#define | NPY_MIN_BUFSIZE ((int)sizeof(cdouble)) |
#define | NPY_MAX_BUFSIZE (((int)sizeof(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_CHKFLAGS(m, FLAGS) ((((PyArrayObject *)(m))->flags & (FLAGS)) == (FLAGS)) |
#define | PyArray_ISCONTIGUOUS(m) PyArray_CHKFLAGS(m, NPY_CONTIGUOUS) |
#define | PyArray_ISWRITEABLE(m) PyArray_CHKFLAGS(m, NPY_WRITEABLE) |
#define | PyArray_ISALIGNED(m) PyArray_CHKFLAGS(m, NPY_ALIGNED) |
#define | PyArray_IS_C_CONTIGUOUS(m) PyArray_CHKFLAGS(m, NPY_C_CONTIGUOUS) |
#define | PyArray_IS_F_CONTIGUOUS(m) PyArray_CHKFLAGS(m, NPY_F_CONTIGUOUS) |
#define | NPY_BEGIN_ALLOW_THREADS |
#define | NPY_END_ALLOW_THREADS |
#define | NPY_BEGIN_THREADS_DEF |
#define | NPY_BEGIN_THREADS |
#define | NPY_END_THREADS |
#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_NO_BROADCAST 0x08000000 |
#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_NEXT3(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_DEFAULT NPY_DEFAULT_TYPE |
#define | PyArray_NDIM(obj) (((PyArrayObject *)(obj))->nd) |
#define | PyArray_ISONESEGMENT(m) |
#define | PyArray_ISFORTRAN(m) |
#define | PyArray_FORTRAN_IF(m) |
#define | FORTRAN_IF PyArray_FORTRAN_IF |
#define | PyArray_DATA(obj) ((void *)(((PyArrayObject *)(obj))->data)) |
#define | PyArray_BYTES(obj) (((PyArrayObject *)(obj))->data) |
#define | PyArray_DIMS(obj) (((PyArrayObject *)(obj))->dimensions) |
#define | PyArray_STRIDES(obj) (((PyArrayObject *)(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 *)(obj))->base) |
#define | PyArray_DESCR(obj) (((PyArrayObject *)(obj))->descr) |
#define | PyArray_FLAGS(obj) (((PyArrayObject *)(obj))->flags) |
#define | PyArray_ITEMSIZE(obj) (((PyArrayObject *)(obj))->descr->elsize) |
#define | PyArray_TYPE(obj) (((PyArrayObject *)(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 | 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_CARRAY) |
#define | PyArray_ISCARRAY_RO(m) PyArray_FLAGSWAP(m, NPY_CARRAY_RO) |
#define | PyArray_ISFARRAY(m) PyArray_FLAGSWAP(m, NPY_FARRAY) |
#define | PyArray_ISFARRAY_RO(m) PyArray_FLAGSWAP(m, NPY_FARRAY_RO) |
#define | PyArray_ISBEHAVED(m) PyArray_FLAGSWAP(m, NPY_BEHAVED) |
#define | PyArray_ISBEHAVED_RO(m) PyArray_FLAGSWAP(m, NPY_ALIGNED) |
#define | PyDataType_ISNOTSWAPPED(d) PyArray_ISNBO(((PyArray_Descr *)(d))->byteorder) |
#define | PyDataType_ISBYTESWAPPED(d) (!PyDataType_ISNOTSWAPPED(d)) |
Typedefs | |
typedef Py_intptr_t | npy_intp |
typedef Py_uintptr_t | npy_uintp |
typedef int | Py_ssize_t |
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_bool( | PyArray_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_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 PyArrayObject | 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 *) |
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_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, NPY_FR_M, NPY_FR_W, NPY_FR_B, NPY_FR_D, NPY_FR_h, NPY_FR_m, NPY_FR_s, NPY_FR_ms, NPY_FR_us, NPY_FR_ns, NPY_FR_ps, NPY_FR_fs, NPY_FR_as } |
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) |
#define _NPY_INCLUDE_NEIGHBORHOOD_IMP |
#define _PyAIT | ( | it | ) | ((PyArrayIterObject *)(it)) |
#define _PyArray_ITER_NEXT1 | ( | it | ) |
{ \ (it)->dataptr += _PyAIT(it)->strides[0]; \ (it)->coordinates[0]++; \ }
#define _PyArray_ITER_NEXT2 | ( | it | ) |
{ \ 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]; \ } \ }
#define _PyArray_ITER_NEXT3 | ( | it | ) |
{ \ if ((it)->coordinates[2] < (it)->dims_m1[2]) { \ (it)->coordinates[2]++; \ (it)->dataptr += (it)->strides[2]; \ } \ else { \ (it)->coordinates[2] = 0; \ (it)->dataptr -= (it)->backstrides[2]; \ 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]; \ } \ } \ }
#define _PyMIT | ( | m | ) | ((PyArrayMultiIterObject *)(m)) |
#define constchar const char |
#define fortran fortran_ |
#define FORTRAN_IF PyArray_FORTRAN_IF |
#define NPY_ALIGNED 0x0100 |
Referenced by PyArray_FromAny().
#define NPY_ALLOW_C_API |
#define NPY_ALLOW_C_API_DEF |
Referenced by NumPyOS_ascii_isalnum().
#define NPY_ALLOW_THREADS 0 |
#define NPY_AO PyArrayObject |
#define NPY_ARR_HAS_DESCR 0x0800 |
#define NPY_BEGIN_ALLOW_THREADS |
Referenced by PyArray_ToFile().
#define NPY_BEGIN_THREADS |
Referenced by PyArray_FromDimsAndDataAndDescr(), and PyArray_ToFile().
#define NPY_BEGIN_THREADS_DEF |
Referenced by new_array_for_sum(), and PyArray_ToFile().
#define NPY_BEGIN_THREADS_DESCR | ( | dtype | ) |
#define NPY_BEHAVED (NPY_ALIGNED | NPY_WRITEABLE) |
#define NPY_BEHAVED_NS (NPY_ALIGNED | NPY_WRITEABLE | NPY_NOTSWAPPED) |
#define NPY_BIG '>' |
#define NPY_BUFSIZE 8192 |
#define NPY_C_CONTIGUOUS NPY_CONTIGUOUS |
Referenced by PyArray_FromAny().
#define NPY_CARRAY (NPY_CONTIGUOUS | NPY_BEHAVED) |
Referenced by PyArray_TakeFrom().
#define NPY_CARRAY_RO (NPY_CONTIGUOUS | NPY_ALIGNED) |
#define NPY_CONTIGUOUS 0x0001 |
#define NPY_DATETIME_DEFAULTUNIT NPY_FR_us |
#define NPY_DATETIME_NUMUNITS (NPY_FR_as + 1) |
#define NPY_DEFAULT NPY_CARRAY |
Referenced by array_subscript().
#define NPY_DEFAULT_TYPE NPY_DOUBLE |
#define NPY_DISABLE_C_API |
#define NPY_ELEMENTSTRIDES 0x0080 |
#define NPY_END_ALLOW_THREADS |
Referenced by PyArray_ToFile().
#define NPY_END_THREADS |
Referenced by PyArray_ToFile().
#define NPY_END_THREADS_DESCR | ( | dtype | ) |
#define NPY_ENSUREARRAY 0x0040 |
Referenced by einsum_sub_op_from_str(), and PyArray_FromAny().
#define NPY_ENSURECOPY 0x0020 |
Referenced by PyArray_FromAny(), and PyArray_TakeFrom().
#define NPY_ERR | ( | str | ) | fprintf(stderr, #str); fflush(stderr); |
#define NPY_ERR2 | ( | str | ) | fprintf(stderr, str); fflush(stderr); |
#define NPY_F_CONTIGUOUS NPY_FORTRAN |
Referenced by npyiter_prepare_operands(), PyArray_FromAny(), and PyArray_GetArrayParamsFromObject().
#define NPY_FAIL 0 |
Referenced by _convert_from_datetime_tuple(), _field_transfer_data_copy(), _strided_cast_data_free(), _strided_to_strided_contig_align_wrap_init_dest(), _strided_to_strided_subarray_broadcast_withrefs(), _strided_to_strided_zero_pad_copy(), get_n_to_n_transfer_function(), get_one_to_n_transfer_function(), NpyIter_EnableExternalLoop(), and NpyIter_RemoveMultiIndex().
#define NPY_FARRAY (NPY_FORTRAN | NPY_BEHAVED) |
#define NPY_FARRAY_RO (NPY_FORTRAN | NPY_ALIGNED) |
#define NPY_FEATURE_VERSION NPY_API_VERSION |
#define NPY_FORCECAST 0x0010 |
#define NPY_FORTRAN 0x0002 |
#define NPY_FROM_FIELDS |
#define NPY_IGNORE '|' |
#define NPY_IN_ARRAY NPY_CARRAY_RO |
#define NPY_IN_FARRAY NPY_FARRAY_RO |
#define NPY_INOUT_ARRAY (NPY_CARRAY | NPY_UPDATEIFCOPY) |
#define NPY_INOUT_FARRAY (NPY_FARRAY | NPY_UPDATEIFCOPY) |
#define NPY_INTP NPY_INT |
Unlike the other NPY_*_FMT macros which are used with PyOS_snprintf, NPY_INTP_FMT is used with PyErr_Format and PyString_Format. These functions use different formatting codes which are portably specified according to the Python documentation. See ticket #1795.
On Windows x64, the LONGLONG formatter should be used, but in Python 2.6 the lld formatter is not supported. In this case we work around the problem by using the zd formatter.
#define NPY_INTP_FMT "d" |
#define NPY_ITEM_HASOBJECT 0x01 |
#define NPY_ITEM_IS_POINTER 0x04 |
#define NPY_ITEM_REFCOUNT 0x01 |
#define NPY_ITER_ALIGNED 0x00100000 |
#define NPY_ITER_ALLOCATE 0x01000000 |
#define NPY_ITER_BUFFERED 0x00000200 |
#define NPY_ITER_C_INDEX 0x00000001 |
#define NPY_ITER_COMMON_DTYPE 0x00000010 |
#define NPY_ITER_CONTIG 0x00200000 |
#define NPY_ITER_COPY 0x00400000 |
#define NPY_ITER_DELAY_BUFALLOC 0x00000800 |
#define NPY_ITER_DONT_NEGATE_STRIDES 0x00001000 |
#define NPY_ITER_EXTERNAL_LOOP 0x00000008 |
#define NPY_ITER_F_INDEX 0x00000002 |
#define NPY_ITER_GLOBAL_FLAGS 0x0000ffff |
#define NPY_ITER_GROWINNER 0x00000400 |
#define NPY_ITER_MULTI_INDEX 0x00000004 |
#define NPY_ITER_NBO 0x00080000 |
#define NPY_ITER_NO_BROADCAST 0x08000000 |
#define NPY_ITER_NO_SUBTYPE 0x02000000 |
#define NPY_ITER_PER_OP_FLAGS 0xffff0000 |
#define NPY_ITER_RANGED 0x00000100 |
#define NPY_ITER_READONLY 0x00020000 |
#define NPY_ITER_READWRITE 0x00010000 |
#define NPY_ITER_REDUCE_OK 0x00000080 |
#define NPY_ITER_REFS_OK 0x00000020 |
#define NPY_ITER_UPDATEIFCOPY 0x00800000 |
#define NPY_ITER_WRITEONLY 0x00040000 |
#define NPY_ITER_ZEROSIZE_OK 0x00000040 |
#define NPY_LIST_PICKLE 0x02 |
#define NPY_LITTLE '<' |
#define NPY_MAX_BUFSIZE (((int)sizeof(cdouble))*1000000) |
#define NPY_MAX_INTP NPY_MAX_INT |
Referenced by PyArray_MultiplyList().
#define NPY_MAX_UINTP NPY_MAX_UINT |
#define NPY_MAXARGS 32 |
#define NPY_MAXDIMS 32 |
Referenced by _strings_richcompare(), arraymultiter_dealloc(), arraymultiter_new(), iterator_loop(), NpyIter_GetIterSize(), NpyIter_IterationNeedsAPI(), and PyArray_GetArrayParamsFromObject().
#define NPY_METADATA_DTSTR "__frequency__" |
Referenced by _arraydescr_isnative(), and PyArray_ClipmodeConverter().
#define NPY_MIN_BUFSIZE ((int)sizeof(cdouble)) |
#define NPY_MIN_INTP NPY_MIN_INT |
#define NPY_NATBYTE NPY_LITTLE |
#define NPY_NATIVE '=' |
Referenced by npyiter_apply_forced_iteration_order().
#define NPY_NEEDS_INIT 0x08 |
#define NPY_NEEDS_PYAPI 0x10 |
#define NPY_NO_EXPORT static |
Referenced by npyiter_seq_ass_slice(), PyArray_ConvertClipmodeSequence(), and ufunc_update_use_defaults().
#define NPY_NOTSWAPPED 0x0200 |
#define NPY_NSCALARKINDS (NPY_OBJECT_SCALAR + 1) |
Referenced by longlong_arrtype_hash().
#define NPY_NSEARCHSIDES (NPY_SEARCHRIGHT + 1) |
#define NPY_NSORTS (NPY_MERGESORT + 1) |
#define NPY_NUM_FLOATTYPE 3 |
#define NPY_OBJECT_DTYPE_FLAGS |
#define NPY_OPPBYTE NPY_BIG |
#define NPY_OUT_ARRAY NPY_CARRAY |
#define NPY_OUT_FARRAY NPY_FARRAY |
#define NPY_OWNDATA 0x0004 |
#define NPY_PRIORITY 0.0 |
#define NPY_SCALAR_PRIORITY -1000000.0 |
#define NPY_SIZEOF_INTP NPY_SIZEOF_PY_INTPTR_T |
#define NPY_SIZEOF_UINTP NPY_SIZEOF_PY_INTPTR_T |
#define NPY_SSIZE_T_PYFMT "i" |
Referenced by array_zeros().
#define NPY_STR_as "as" |
#define NPY_STR_B "B" |
#define NPY_STR_D "D" |
#define NPY_STR_fs "fs" |
#define NPY_STR_h "h" |
#define NPY_STR_M "M" |
#define NPY_STR_m "m" |
#define NPY_STR_ms "ms" |
#define NPY_STR_ns "ns" |
#define NPY_STR_ps "ps" |
#define NPY_STR_s "s" |
#define NPY_STR_us "us" |
#define NPY_STR_W "W" |
#define NPY_STR_Y "Y" |
#define NPY_STRINGIFY | ( | x | ) | #x |
#define NPY_SUBTYPE_PRIORITY 1.0 |
#define NPY_SUCCEED 1 |
#define NPY_SWAP 's' |
#define NPY_TOSTRING | ( | x | ) | NPY_STRINGIFY(x) |
#define NPY_UINTP NPY_UINT |
#define NPY_UPDATE_ALL (NPY_CONTIGUOUS | NPY_FORTRAN | NPY_ALIGNED) |
#define NPY_UPDATEIFCOPY 0x1000 |
Referenced by PyArray_FromAny(), PyArray_GetArrayParamsFromObject(), and PyArray_TakeFrom().
#define NPY_USE_GETITEM 0x20 |
#define NPY_USE_PYMEM 1 |
#define NPY_USE_SETITEM 0x40 |
#define NPY_VERSION NPY_ABI_VERSION |
#define NPY_WRITEABLE 0x0400 |
#define PY_SSIZE_T_MAX INT_MAX |
#define PY_SSIZE_T_MIN INT_MIN |
#define PyArray_BASE | ( | obj | ) | (((PyArrayObject *)(obj))->base) |
Referenced by array_astype(), array_wraparray(), and PyArray_CastScalarDirect().
#define PyArray_BYTES | ( | obj | ) | (((PyArrayObject *)(obj))->data) |
#define PyArray_CEQ | ( | p, | |
q | |||
) | (((p).real==(q).real) && ((p).imag == (q).imag)) |
#define PyArray_CGE | ( | p, | |
q | |||
) |
((((p).real==(q).real) ? ((p).imag >= (q).imag) : \ ((p).real >= (q).real)))
#define PyArray_CGT | ( | p, | |
q | |||
) |
((((p).real==(q).real) ? ((p).imag > (q).imag) : \ ((p).real > (q).real)))
#define PyArray_CHKFLAGS | ( | m, | |
FLAGS | |||
) | ((((PyArrayObject *)(m))->flags & (FLAGS)) == (FLAGS)) |
Referenced by npyiter_prepare_operands().
#define PyArray_CLE | ( | p, | |
q | |||
) |
((((p).real==(q).real) ? ((p).imag <= (q).imag) : \ ((p).real <= (q).real)))
#define PyArray_CLT | ( | p, | |
q | |||
) |
((((p).real==(q).real) ? ((p).imag < (q).imag) : \ ((p).real < (q).real)))
#define PyArray_CNE | ( | p, | |
q | |||
) | (((p).real!=(q).real) || ((p).imag != (q).imag)) |
#define PyArray_DATA | ( | obj | ) | ((void *)(((PyArrayObject *)(obj))->data)) |
#define PyArray_DEFAULT NPY_DEFAULT_TYPE |
#define PyArray_DESCR | ( | obj | ) | (((PyArrayObject *)(obj))->descr) |
#define PyArray_DIM | ( | obj, | |
n | |||
) | (PyArray_DIMS(obj)[n]) |
Referenced by discover_itemsize(), and recursive_tolist().
#define PyArray_DIMS | ( | obj | ) | (((PyArrayObject *)(obj))->dimensions) |
Referenced by _strings_richcompare(), array_astype(), array_subscript(), array_wraparray(), and byte_swap_vector().
#define PyArray_FLAGS | ( | obj | ) | (((PyArrayObject *)(obj))->flags) |
Referenced by array_astype(), array_wraparray(), PyArray_FromAny(), and PyArray_NewFlagsObject().
#define PyArray_FLAGSWAP | ( | m, | |
flags | |||
) |
(PyArray_CHKFLAGS(m, flags) && \ PyArray_ISNOTSWAPPED(m))
#define PyArray_FORTRAN_IF | ( | m | ) |
((PyArray_CHKFLAGS(m, NPY_FORTRAN) ? \ NPY_FORTRAN : 0))
#define PyArray_free PyMem_Free |
#define PyArray_GETITEM | ( | obj, | |
itemptr | |||
) |
((PyArrayObject *)(obj))->descr->f->getitem((char *)(itemptr), \ (PyArrayObject *)(obj))
#define PyArray_HASFIELDS | ( | obj | ) | PyDataType_HASFIELDS(PyArray_DESCR(obj)) |
#define PyArray_IS_C_CONTIGUOUS | ( | m | ) | PyArray_CHKFLAGS(m, NPY_C_CONTIGUOUS) |
#define PyArray_IS_F_CONTIGUOUS | ( | m | ) | PyArray_CHKFLAGS(m, NPY_F_CONTIGUOUS) |
#define PyArray_ISALIGNED | ( | m | ) | PyArray_CHKFLAGS(m, NPY_ALIGNED) |
#define PyArray_ISBEHAVED | ( | m | ) | PyArray_FLAGSWAP(m, NPY_BEHAVED) |
#define PyArray_ISBEHAVED_RO | ( | m | ) | PyArray_FLAGSWAP(m, NPY_ALIGNED) |
Referenced by PyTimeDelta_AsNormalized().
#define PyArray_ISBOOL | ( | obj | ) | PyTypeNum_ISBOOL(PyArray_TYPE(obj)) |
Referenced by array_subscript(), and count_new_axes_0d().
#define PyArray_ISBYTESWAPPED | ( | m | ) | (!PyArray_ISNOTSWAPPED(m)) |
#define PyArray_ISCARRAY | ( | m | ) | PyArray_FLAGSWAP(m, NPY_CARRAY) |
#define PyArray_ISCARRAY_RO | ( | m | ) | PyArray_FLAGSWAP(m, NPY_CARRAY_RO) |
#define PyArray_ISCOMPLEX | ( | obj | ) | PyTypeNum_ISCOMPLEX(PyArray_TYPE(obj)) |
Referenced by array_real_get(), and PyArray_CumSum().
#define PyArray_ISCONTIGUOUS | ( | m | ) | PyArray_CHKFLAGS(m, NPY_CONTIGUOUS) |
Referenced by PyArray_ToFile().
#define PyArray_ISDATETIME | ( | obj | ) | PyTypeNum_ISDATETIME(PyArray_TYPE(obj)) |
#define PyArray_ISEXTENDED | ( | obj | ) | PyTypeNum_ISEXTENDED(PyArray_TYPE(obj)) |
Referenced by dump_data().
#define PyArray_ISFARRAY | ( | m | ) | PyArray_FLAGSWAP(m, NPY_FARRAY) |
#define PyArray_ISFARRAY_RO | ( | m | ) | PyArray_FLAGSWAP(m, NPY_FARRAY_RO) |
#define PyArray_ISFLEXIBLE | ( | obj | ) | PyTypeNum_ISFLEXIBLE(PyArray_TYPE(obj)) |
#define PyArray_ISFLOAT | ( | obj | ) | PyTypeNum_ISFLOAT(PyArray_TYPE(obj)) |
#define PyArray_ISFORTRAN | ( | m | ) |
(PyArray_CHKFLAGS(m, NPY_FORTRAN) && \ (PyArray_NDIM(m) > 1))
Referenced by array_real_get().
#define PyArray_ISINTEGER | ( | obj | ) | PyTypeNum_ISINTEGER(PyArray_TYPE(obj)) |
Referenced by array_hex(), count_new_axes_0d(), and PyArray_PyIntAsIntp().
#define PyArray_IsNativeByteOrder PyArray_ISNBO |
#define PyArray_ISNBO | ( | arg | ) | ((arg) != NPY_OPPBYTE) |
Referenced by gentype_interface_get(), npyiter_apply_forced_iteration_order(), and PyArray_FromStructInterface().
#define PyArray_ISNOTSWAPPED | ( | m | ) | PyArray_ISNBO(PyArray_DESCR(m)->byteorder) |
Referenced by LONGDOUBLE_setitem(), and PyTimeDelta_AsNormalized().
#define PyArray_ISNUMBER | ( | obj | ) | PyTypeNum_ISNUMBER(PyArray_TYPE(obj)) |
#define PyArray_ISOBJECT | ( | obj | ) | PyTypeNum_ISOBJECT(PyArray_TYPE(obj)) |
Referenced by PyArray_ResultType().
#define PyArray_ISONESEGMENT | ( | m | ) |
(PyArray_NDIM(m) == 0 || \ PyArray_CHKFLAGS(m, NPY_CONTIGUOUS) || \ PyArray_CHKFLAGS(m, NPY_FORTRAN))
Referenced by array_getsegcount().
#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)) |
#define PyArray_ISWRITEABLE | ( | m | ) | PyArray_CHKFLAGS(m, NPY_WRITEABLE) |
Referenced by array_item_nice(), PyArray_FromAny(), and PyArray_New().
#define PyArray_ITEMSIZE | ( | obj | ) | (((PyArrayObject *)(obj))->descr->elsize) |
#define PyArray_ITER_DATA | ( | it | ) | ((void *)(_PyAIT(it)->dataptr)) |
#define PyArray_ITER_GOTO | ( | it, | |
destination | |||
) |
{ \ int __npy_i; \ _PyAIT(it)->index = 0; \ _PyAIT(it)->dataptr = _PyAIT(it)->ao->data; \ 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) ; \ } \ }
#define PyArray_ITER_GOTO1D | ( | it, | |
ind | |||
) |
{ \ 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 = _PyAIT(it)->ao->data + \ __npy_ind * _PyAIT(it)->strides[0]; \ } \ else if (_PyAIT(it)->contiguous) \ _PyAIT(it)->dataptr = _PyAIT(it)->ao->data + \ __npy_ind * _PyAIT(it)->ao->descr->elsize; \ else { \ _PyAIT(it)->dataptr = _PyAIT(it)->ao->data; \ 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]; \ } \ } \ }
Referenced by iter_ass_subscript().
#define PyArray_ITER_NEXT | ( | it | ) |
{ \ _PyAIT(it)->index++; \ if (_PyAIT(it)->nd_m1 == 0) { \ _PyArray_ITER_NEXT1(_PyAIT(it)); \ } \ else if (_PyAIT(it)->contiguous) \ _PyAIT(it)->dataptr += _PyAIT(it)->ao->descr->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]; \ } \ } \ } \ }
Referenced by _new_sort(), copy_object(), iter_ass_subscript(), PyArray_Byteswap(), PyArray_INCREF(), PyArray_RemoveSmallest(), PyArray_ToFile(), and type().
#define PyArray_ITER_NOTDONE | ( | it | ) | (_PyAIT(it)->index < _PyAIT(it)->size) |
#define PyArray_ITER_RESET | ( | it | ) |
#define PyArray_malloc PyMem_Malloc |
#define PyArray_MAX | ( | a, | |
b | |||
) | (((a)>(b))?(a):(b)) |
#define PyArray_MIN | ( | a, | |
b | |||
) | (((a)<(b))?(a):(b)) |
#define PyArray_MultiIter_DATA | ( | multi, | |
i | |||
) | ((void *)(_PyMIT(multi)->iters[i]->dataptr)) |
#define PyArray_MultiIter_GOTO | ( | multi, | |
dest | |||
) |
{ \ 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; \ }
#define PyArray_MultiIter_GOTO1D | ( | multi, | |
ind | |||
) |
{ \ 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; \ }
#define PyArray_MultiIter_NEXT | ( | multi | ) |
{ \ 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]); \ } \ }
#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 PyArray_MultiIter_RESET | ( | multi | ) |
{ \ 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]); \ } \ }
#define PyArray_NDIM | ( | obj | ) | (((PyArrayObject *)(obj))->nd) |
Referenced by _strings_richcompare(), array_astype(), array_wraparray(), byte_swap_vector(), iterator_loop(), npyiter_apply_forced_iteration_order(), PyArray_AssignFromSequence(), PyArray_CopyAnyIntoOrdered(), PyArray_GetArrayParamsFromObject(), and recursive_tolist().
#define PyArray_realloc PyMem_Realloc |
#define PyArray_SAFEALIGNEDCOPY | ( | obj | ) | (PyArray_ISALIGNED(obj) && !PyArray_ISVARIABLE(obj)) |
#define PyArray_SETITEM | ( | obj, | |
itemptr, | |||
v | |||
) |
((PyArrayObject *)(obj))->descr->f->setitem((PyObject *)(v), \ (char *)(itemptr), \ (PyArrayObject *)(obj))
#define PyArray_STRIDE | ( | obj, | |
n | |||
) | (PyArray_STRIDES(obj)[n]) |
Referenced by recursive_tolist().
#define PyArray_STRIDES | ( | obj | ) | (((PyArrayObject *)(obj))->strides) |
Referenced by array_astype(), array_wraparray(), and byte_swap_vector().
#define PyArray_TYPE | ( | obj | ) | (((PyArrayObject *)(obj))->descr->type_num) |
#define PyArrayIter_Check | ( | op | ) | PyObject_TypeCheck(op, &PyArrayIter_Type) |
#define PyDataMem_FREE | ( | ptr | ) | free(ptr) |
Referenced by _new_sort(), and PyArray_ResultType().
#define PyDataMem_NEW | ( | size | ) | ((char *)malloc(size)) |
Referenced by _new_sort(), and PyArray_ResultType().
#define PyDataMem_RENEW | ( | ptr, | |
size | |||
) | ((char *)realloc(ptr,size)) |
#define PyDataType_FLAGCHK | ( | dtype, | |
flag | |||
) | (((dtype)->flags & (flag)) == (flag)) |
Referenced by array_nbytes_get(), and PyArray_ToFile().
#define PyDataType_GetDatetimeMetaData | ( | descr | ) |
((descr->metadata == NULL) ? NULL : \ ((PyArray_DatetimeMetaData *)(PyCObject_AsVoidPtr( \ PyDict_GetItemString(descr->metadata, NPY_METADATA_DTSTR)))))
#define PyDataType_HASFIELDS | ( | obj | ) | (((PyArray_Descr *)(obj))->names != NULL) |
#define PyDataType_ISBOOL | ( | obj | ) | PyTypeNum_ISBOOL(_PyADt(obj)) |
#define PyDataType_ISBYTESWAPPED | ( | d | ) | (!PyDataType_ISNOTSWAPPED(d)) |
#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 PyDataType_REFCHK | ( | dtype | ) | PyDataType_FLAGCHK(dtype, NPY_ITEM_REFCOUNT) |
Referenced by _field_transfer_data_copy(), array_float(), array_int(), and get_n_to_n_transfer_function().
#define PyDimMem_FREE | ( | ptr | ) | PyArray_free(ptr) |
Referenced by _mergesort(), _strided_to_strided_subarray_broadcast_withrefs(), and array_empty().
#define PyIndex_Check | ( | op | ) | 0 |
#define PyIntpArrType_Type PyIntArrType_Type |
#define PyTypeNum_ISBOOL | ( | type | ) | ((type) == NPY_BOOL) |
#define PyTypeNum_ISCOMPLEX | ( | type | ) |
(((type) >= NPY_CFLOAT) && \ ((type) <= NPY_CLONGDOUBLE))
#define PyTypeNum_ISDATETIME | ( | type | ) |
(((type) >=NPY_DATETIME) && \ ((type) <=NPY_TIMEDELTA))
#define PyTypeNum_ISEXTENDED | ( | type | ) |
(PyTypeNum_ISFLEXIBLE(type) || \ PyTypeNum_ISUSERDEF(type))
#define PyTypeNum_ISFLEXIBLE | ( | type | ) |
(((type) >=NPY_STRING) && \ ((type) <=NPY_VOID))
#define PyTypeNum_ISFLOAT | ( | type | ) |
#define PyTypeNum_ISINTEGER | ( | type | ) |
(((type) >= NPY_BYTE) && \ ((type) <= NPY_ULONGLONG))
#define PyTypeNum_ISNUMBER | ( | type | ) |
(((type) <= NPY_CLONGDOUBLE) || \ ((type) == NPY_HALF))
Referenced by _strided_cast_data_copy().
#define PyTypeNum_ISOBJECT | ( | type | ) | ((type) == NPY_OBJECT) |
#define PyTypeNum_ISPYTHON | ( | type | ) |
(((type) == NPY_LONG) || \ ((type) == NPY_DOUBLE) || \ ((type) == NPY_CDOUBLE) || \ ((type) == NPY_BOOL) || \ ((type) == NPY_OBJECT ))
#define PyTypeNum_ISSIGNED | ( | type | ) |
#define PyTypeNum_ISSTRING | ( | type | ) |
(((type) == NPY_STRING) || \ ((type) == NPY_UNICODE))
#define PyTypeNum_ISUNSIGNED | ( | type | ) |
(((type) == NPY_UBYTE) || \ ((type) == NPY_USHORT) || \ ((type) == NPY_UINT) || \ ((type) == NPY_ULONG) || \ ((type) == NPY_ULONGLONG))
#define PyTypeNum_ISUSERDEF | ( | type | ) |
(((type) >= NPY_USERDEF) && \ ((type) < NPY_USERDEF+ \ NPY_NUMUSERTYPES))
Referenced by _signbit_set(), and ufunc_loop_matches().
#define PyUIntpArrType_Type PyUIntArrType_Type |
typedef Py_intptr_t npy_intp |
typedef char*(* npy_iter_get_dataptr_t)(PyArrayIterObject *iter, npy_intp *) |
typedef Py_uintptr_t npy_uintp |
typedef struct NpyIter_InternalOnly NpyIter |
typedef void( NpyIter_GetMultiIndexFunc)(NpyIter *iter, npy_intp *outcoords) |
typedef int( NpyIter_IterNextFunc)(NpyIter *iter) |
typedef int Py_ssize_t |
typedef int( PyArray_ArgFunc)(void *, npy_intp, npy_intp *, void *) |
typedef int( PyArray_ArgSortFunc)(void *, npy_intp *, npy_intp, void *) |
typedef struct _arr_descr PyArray_ArrayDescr |
typedef int( PyArray_CompareFunc)(const void *, const void *, void *) |
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 *) |
typedef npy_bool( PyArray_NonzeroFunc)(void *, void *) |
typedef int( PyArray_ScalarKindFunc)(void *) |
typedef int( PyArray_ScanFunc)(FILE *fp, void *dptr, char *ignore, struct _PyArray_Descr *) |
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 *) |
typedef struct PyArrayFlagsObject PyArrayFlagsObject |
typedef struct PyArrayIterObject_tag PyArrayIterObject |
typedef struct PyArrayObject PyArrayObject |
anonymous enum |
enum NPY_CASTING |
enum NPY_CLIPMODE |
enum NPY_DATETIMEUNIT |
enum NPY_ORDER |
enum NPY_SCALARKIND |
enum NPY_SEARCHSIDE |
enum NPY_SORTKIND |
enum NPY_TYPECHAR |
enum NPY_TYPES |
static NPY_INLINE int PyArrayNeighborhoodIter_Next | ( | PyArrayNeighborhoodIterObject * | iter | ) | [static] |
static NPY_INLINE int PyArrayNeighborhoodIter_Reset | ( | PyArrayNeighborhoodIterObject * | iter | ) | [static] |