numpy
2.0.0
|
Go to the source code of this file.
Data Structures | |
struct | npy_cdouble |
struct | npy_cfloat |
struct | npy_clongdouble |
Defines | |
#define | NPY_INLINE |
#define | npy_fseek fseek |
#define | npy_ftell ftell |
#define | NPY_SIZEOF_CHAR 1 |
#define | NPY_SIZEOF_BYTE 1 |
#define | NPY_SIZEOF_INTP NPY_SIZEOF_PY_INTPTR_T |
#define | NPY_SIZEOF_UINTP NPY_SIZEOF_PY_INTPTR_T |
#define | NPY_SIZEOF_CFLOAT NPY_SIZEOF_COMPLEX_FLOAT |
#define | NPY_SIZEOF_CDOUBLE NPY_SIZEOF_COMPLEX_DOUBLE |
#define | NPY_SIZEOF_CLONGDOUBLE NPY_SIZEOF_COMPLEX_LONGDOUBLE |
#define | NPY_SSIZE_T_PYFMT "i" |
#define | constchar const char |
#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_BYTE_FMT "hhd" |
#define | NPY_UBYTE_FMT "hhu" |
#define | NPY_SHORT_FMT "hd" |
#define | NPY_USHORT_FMT "hu" |
#define | NPY_INT_FMT "d" |
#define | NPY_UINT_FMT "u" |
#define | NPY_LONG_FMT "ld" |
#define | NPY_ULONG_FMT "lu" |
#define | NPY_HALF_FMT "g" |
#define | NPY_FLOAT_FMT "g" |
#define | NPY_DOUBLE_FMT "g" |
#define | NPY_LONGLONG_SUFFIX(x) (x##L) |
#define | NPY_ULONGLONG_SUFFIX(x) (x##UL) |
#define | NPY_FALSE 0 |
#define | NPY_TRUE 1 |
#define | NPY_LONGDOUBLE_FMT "g" |
#define | NPY_MAX_INT8 127 |
#define | NPY_MIN_INT8 -128 |
#define | NPY_MAX_UINT8 255 |
#define | NPY_MAX_INT16 32767 |
#define | NPY_MIN_INT16 -32768 |
#define | NPY_MAX_UINT16 65535 |
#define | NPY_MAX_INT32 2147483647 |
#define | NPY_MIN_INT32 (-NPY_MAX_INT32 - 1) |
#define | NPY_MAX_UINT32 4294967295U |
#define | NPY_MAX_INT64 NPY_LONGLONG_SUFFIX(9223372036854775807) |
#define | NPY_MIN_INT64 (-NPY_MAX_INT64 - NPY_LONGLONG_SUFFIX(1)) |
#define | NPY_MAX_UINT64 NPY_ULONGLONG_SUFFIX(18446744073709551615) |
#define | NPY_MAX_INT128 NPY_LONGLONG_SUFFIX(85070591730234615865843651857942052864) |
#define | NPY_MIN_INT128 (-NPY_MAX_INT128 - NPY_LONGLONG_SUFFIX(1)) |
#define | NPY_MAX_UINT128 NPY_ULONGLONG_SUFFIX(170141183460469231731687303715884105728) |
#define | NPY_MAX_INT256 NPY_LONGLONG_SUFFIX(57896044618658097711785492504343953926634992332820282019728792003956564819967) |
#define | NPY_MIN_INT256 (-NPY_MAX_INT256 - NPY_LONGLONG_SUFFIX(1)) |
#define | NPY_MAX_UINT256 NPY_ULONGLONG_SUFFIX(115792089237316195423570985008687907853269984665640564039457584007913129639935) |
#define | NPY_MIN_DATETIME NPY_MIN_INT64 |
#define | NPY_MAX_DATETIME NPY_MAX_INT64 |
#define | NPY_MIN_TIMEDELTA NPY_MIN_INT64 |
#define | NPY_MAX_TIMEDELTA NPY_MAX_INT64 |
#define | NPY_MAX_BYTE SCHAR_MAX |
#define | NPY_MIN_BYTE SCHAR_MIN |
#define | NPY_MAX_UBYTE UCHAR_MAX |
#define | NPY_MAX_SHORT SHRT_MAX |
#define | NPY_MIN_SHORT SHRT_MIN |
#define | NPY_MAX_USHORT USHRT_MAX |
#define | NPY_MAX_INT INT_MAX |
#define | NPY_MIN_INT INT_MIN |
#define | NPY_MAX_UINT UINT_MAX |
#define | NPY_MAX_LONG LONG_MAX |
#define | NPY_MIN_LONG LONG_MIN |
#define | NPY_MAX_ULONG ULONG_MAX |
#define | NPY_SIZEOF_HALF 2 |
#define | NPY_SIZEOF_DATETIME 8 |
#define | NPY_SIZEOF_TIMEDELTA 8 |
#define | NPY_BITSOF_BOOL (sizeof(npy_bool) * CHAR_BIT) |
#define | NPY_BITSOF_CHAR CHAR_BIT |
#define | NPY_BITSOF_BYTE (NPY_SIZEOF_BYTE * CHAR_BIT) |
#define | NPY_BITSOF_SHORT (NPY_SIZEOF_SHORT * CHAR_BIT) |
#define | NPY_BITSOF_INT (NPY_SIZEOF_INT * CHAR_BIT) |
#define | NPY_BITSOF_LONG (NPY_SIZEOF_LONG * CHAR_BIT) |
#define | NPY_BITSOF_LONGLONG (NPY_SIZEOF_LONGLONG * CHAR_BIT) |
#define | NPY_BITSOF_INTP (NPY_SIZEOF_INTP * CHAR_BIT) |
#define | NPY_BITSOF_HALF (NPY_SIZEOF_HALF * CHAR_BIT) |
#define | NPY_BITSOF_FLOAT (NPY_SIZEOF_FLOAT * CHAR_BIT) |
#define | NPY_BITSOF_DOUBLE (NPY_SIZEOF_DOUBLE * CHAR_BIT) |
#define | NPY_BITSOF_LONGDOUBLE (NPY_SIZEOF_LONGDOUBLE * CHAR_BIT) |
#define | NPY_BITSOF_CFLOAT (NPY_SIZEOF_CFLOAT * CHAR_BIT) |
#define | NPY_BITSOF_CDOUBLE (NPY_SIZEOF_CDOUBLE * CHAR_BIT) |
#define | NPY_BITSOF_CLONGDOUBLE (NPY_SIZEOF_CLONGDOUBLE * CHAR_BIT) |
#define | NPY_BITSOF_DATETIME (NPY_SIZEOF_DATETIME * CHAR_BIT) |
#define | NPY_BITSOF_TIMEDELTA (NPY_SIZEOF_TIMEDELTA * CHAR_BIT) |
#define | NPY_FLOAT16 NPY_HALF |
#define | NPY_DATETIME_FMT NPY_INT64_FMT |
#define | NPY_TIMEDELTA_FMT NPY_INT64_FMT |
Typedefs | |
typedef Py_intptr_t | npy_intp |
typedef Py_uintptr_t | npy_uintp |
typedef long | npy_longlong |
typedef unsigned long | npy_ulonglong |
typedef unsigned char | npy_bool |
typedef double | npy_longdouble |
typedef signed char | npy_byte |
typedef unsigned char | npy_ubyte |
typedef unsigned short | npy_ushort |
typedef unsigned int | npy_uint |
typedef unsigned long | npy_ulong |
typedef char | npy_char |
typedef short | npy_short |
typedef int | npy_int |
typedef long | npy_long |
typedef float | npy_float |
typedef double | npy_double |
typedef npy_uint16 | npy_half |
typedef npy_half | npy_float16 |
typedef npy_int64 | npy_timedelta |
typedef npy_int64 | npy_datetime |
Enumerations | |
enum | { NPY_CPU_UNKNOWN_ENDIAN, NPY_CPU_LITTLE, NPY_CPU_BIG } |
#define constchar const char |
#define NPY_BITSOF_BOOL (sizeof(npy_bool) * CHAR_BIT) |
#define NPY_BITSOF_BYTE (NPY_SIZEOF_BYTE * CHAR_BIT) |
#define NPY_BITSOF_CDOUBLE (NPY_SIZEOF_CDOUBLE * CHAR_BIT) |
#define NPY_BITSOF_CFLOAT (NPY_SIZEOF_CFLOAT * CHAR_BIT) |
#define NPY_BITSOF_CHAR CHAR_BIT |
#define NPY_BITSOF_CLONGDOUBLE (NPY_SIZEOF_CLONGDOUBLE * CHAR_BIT) |
#define NPY_BITSOF_DATETIME (NPY_SIZEOF_DATETIME * CHAR_BIT) |
#define NPY_BITSOF_DOUBLE (NPY_SIZEOF_DOUBLE * CHAR_BIT) |
#define NPY_BITSOF_FLOAT (NPY_SIZEOF_FLOAT * CHAR_BIT) |
#define NPY_BITSOF_HALF (NPY_SIZEOF_HALF * CHAR_BIT) |
#define NPY_BITSOF_INT (NPY_SIZEOF_INT * CHAR_BIT) |
#define NPY_BITSOF_INTP (NPY_SIZEOF_INTP * CHAR_BIT) |
#define NPY_BITSOF_LONG (NPY_SIZEOF_LONG * CHAR_BIT) |
#define NPY_BITSOF_LONGDOUBLE (NPY_SIZEOF_LONGDOUBLE * CHAR_BIT) |
#define NPY_BITSOF_LONGLONG (NPY_SIZEOF_LONGLONG * CHAR_BIT) |
#define NPY_BITSOF_SHORT (NPY_SIZEOF_SHORT * CHAR_BIT) |
#define NPY_BITSOF_TIMEDELTA (NPY_SIZEOF_TIMEDELTA * CHAR_BIT) |
#define NPY_BYTE_FMT "hhd" |
#define NPY_DATETIME_FMT NPY_INT64_FMT |
#define NPY_DOUBLE_FMT "g" |
#define NPY_FALSE 0 |
#define NPY_FLOAT16 NPY_HALF |
#define NPY_FLOAT_FMT "g" |
#define npy_fseek fseek |
Referenced by PyArray_CheckAxis(), and PyUnicode_Concat2().
#define npy_ftell ftell |
Referenced by PyArray_CheckAxis().
#define NPY_HALF_FMT "g" |
#define NPY_INLINE |
#define NPY_INT_FMT "d" |
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.
Referenced by local_argsearch_right(), PyArray_ArgMax(), and PyArray_TakeFrom().
#define NPY_INTP_FMT "d" |
Referenced by PyArray_ToFile().
#define NPY_LONG_FMT "ld" |
#define NPY_LONGDOUBLE_FMT "g" |
#define NPY_LONGLONG_SUFFIX | ( | x | ) | (x##L) |
#define NPY_MAX_BYTE SCHAR_MAX |
make definitions accordingly.
C states that sizeof(char) == 1 by definition
So, just using the sizeof keyword won't help.
It also looks like Python itself uses sizeof(char) quite a bit, which by definition should be 1 all the time.
Idea: Make Use of CHAR_BIT which should tell us how many BITS per CHARACTER
#define NPY_MAX_DATETIME NPY_MAX_INT64 |
#define NPY_MAX_INT INT_MAX |
Referenced by gentype_getsegcount().
#define NPY_MAX_INT128 NPY_LONGLONG_SUFFIX(85070591730234615865843651857942052864) |
#define NPY_MAX_INT16 32767 |
#define NPY_MAX_INT256 NPY_LONGLONG_SUFFIX(57896044618658097711785492504343953926634992332820282019728792003956564819967) |
#define NPY_MAX_INT32 2147483647 |
#define NPY_MAX_INT64 NPY_LONGLONG_SUFFIX(9223372036854775807) |
#define NPY_MAX_INT8 127 |
#define NPY_MAX_INTP NPY_MAX_INT |
#define NPY_MAX_LONG LONG_MAX |
#define NPY_MAX_SHORT SHRT_MAX |
#define NPY_MAX_TIMEDELTA NPY_MAX_INT64 |
#define NPY_MAX_UBYTE UCHAR_MAX |
#define NPY_MAX_UINT UINT_MAX |
#define NPY_MAX_UINT128 NPY_ULONGLONG_SUFFIX(170141183460469231731687303715884105728) |
#define NPY_MAX_UINT16 65535 |
#define NPY_MAX_UINT256 NPY_ULONGLONG_SUFFIX(115792089237316195423570985008687907853269984665640564039457584007913129639935) |
#define NPY_MAX_UINT32 4294967295U |
#define NPY_MAX_UINT64 NPY_ULONGLONG_SUFFIX(18446744073709551615) |
#define NPY_MAX_UINT8 255 |
#define NPY_MAX_UINTP NPY_MAX_UINT |
#define NPY_MAX_ULONG ULONG_MAX |
#define NPY_MAX_USHORT USHRT_MAX |
#define NPY_MIN_BYTE SCHAR_MIN |
#define NPY_MIN_DATETIME NPY_MIN_INT64 |
#define NPY_MIN_INT INT_MIN |
#define NPY_MIN_INT128 (-NPY_MAX_INT128 - NPY_LONGLONG_SUFFIX(1)) |
#define NPY_MIN_INT16 -32768 |
#define NPY_MIN_INT256 (-NPY_MAX_INT256 - NPY_LONGLONG_SUFFIX(1)) |
#define NPY_MIN_INT32 (-NPY_MAX_INT32 - 1) |
#define NPY_MIN_INT64 (-NPY_MAX_INT64 - NPY_LONGLONG_SUFFIX(1)) |
#define NPY_MIN_INT8 -128 |
#define NPY_MIN_INTP NPY_MIN_INT |
#define NPY_MIN_LONG LONG_MIN |
#define NPY_MIN_SHORT SHRT_MIN |
#define NPY_MIN_TIMEDELTA NPY_MIN_INT64 |
#define NPY_SHORT_FMT "hd" |
#define NPY_SIZEOF_BYTE 1 |
#define NPY_SIZEOF_CDOUBLE NPY_SIZEOF_COMPLEX_DOUBLE |
#define NPY_SIZEOF_CFLOAT NPY_SIZEOF_COMPLEX_FLOAT |
#define NPY_SIZEOF_CHAR 1 |
#define NPY_SIZEOF_CLONGDOUBLE NPY_SIZEOF_COMPLEX_LONGDOUBLE |
#define NPY_SIZEOF_DATETIME 8 |
#define NPY_SIZEOF_HALF 2 |
#define NPY_SIZEOF_INTP NPY_SIZEOF_PY_INTPTR_T |
Referenced by npyiter_check_casting().
#define NPY_SIZEOF_TIMEDELTA 8 |
#define NPY_SIZEOF_UINTP NPY_SIZEOF_PY_INTPTR_T |
#define NPY_SSIZE_T_PYFMT "i" |
#define NPY_TIMEDELTA_FMT NPY_INT64_FMT |
#define NPY_TRUE 1 |
#define NPY_UBYTE_FMT "hhu" |
#define NPY_UINT_FMT "u" |
#define NPY_ULONG_FMT "lu" |
#define NPY_ULONGLONG_SUFFIX | ( | x | ) | (x##UL) |
#define NPY_USHORT_FMT "hu" |
#define PyIntpArrType_Type PyIntArrType_Type |
#define PyUIntpArrType_Type PyUIntArrType_Type |
typedef unsigned char npy_bool |
typedef signed char npy_byte |
typedef char npy_char |
typedef npy_int64 npy_datetime |
typedef double npy_double |
typedef float npy_float |
typedef npy_half npy_float16 |
typedef npy_uint16 npy_half |
typedef int npy_int |
typedef Py_intptr_t npy_intp |
typedef long npy_long |
typedef double npy_longdouble |
typedef long npy_longlong |
typedef short npy_short |
typedef npy_int64 npy_timedelta |
typedef unsigned char npy_ubyte |
typedef unsigned int npy_uint |
typedef Py_uintptr_t npy_uintp |
typedef unsigned long npy_ulong |
typedef unsigned long npy_ulonglong |
typedef unsigned short npy_ushort |