(unsigned) char
(unsigned) short
(unsigned) int
(unsigned) long int
(unsigned long long int)
(unsigned) Py_intptr_t (an integer that is the size of a pointer on the platform).
The enumeration value for the boolean type, stored as one byte. It may only be set to the values 0 and 1.
The enumeration value for an 8-bit/1-byte signed integer.
The enumeration value for a 16-bit/2-byte signed integer.
The enumeration value for a 32-bit/4-byte signed integer.
Equivalent to either NPY_INT or NPY_LONGLONG, depending on the platform.
The enumeration value for a 64-bit/8-byte signed integer.
The enumeration value for an 8-bit/1-byte unsigned integer.
The enumeration value for a 16-bit/2-byte unsigned integer.
The enumeration value for a 32-bit/4-byte unsigned integer.
Equivalent to either NPY_UINT or NPY_ULONGLONG, depending on the platform.
The enumeration value for a 64-bit/8-byte unsigned integer.
The enumeration value for a 16-bit/2-byte IEEE 754-2008 compatible floating point type.
The enumeration value for a 32-bit/4-byte IEEE 754 compatible floating point type.
The enumeration value for a 64-bit/8-byte IEEE 754 compatible floating point type.
The enumeration value for a platform-specific floating point type which is at least as large as NPY_DOUBLE, but larger on many platforms.
The enumeration value for a 64-bit/8-byte complex type made up of two NPY_FLOAT values.
The enumeration value for a 128-bit/16-byte complex type made up of two NPY_DOUBLE values.
The enumeration value for a platform-specific complex floating point type which is made up of two NPY_LONGDOUBLE values.
The enumeration value for a data type which holds dates or datetimes with a precision based on selectable date or time units.
The enumeration value for a data type which holds lengths of times in integers of selectable date or time units.
The enumeration value for ASCII strings of a selectable size. The strings have a fixed maximum size within a given array.
The enumeration value for UCS4 strings of a selectable size. The strings have a fixed maximum size within a given array.
The enumeration value for references to arbitrary Python objects.
Primarily used to hold struct dtypes, but can contain arbitrary binary data.
Some useful aliases of the above types are
The enumeration value for a signed integer type which is the same size as a (void *) pointer. This is the type used by all arrays of indices.
The enumeration value for an unsigned integer type which is the same size as a (void *) pointer.
The enumeration value of the type used for masks, such as with the NPY_ITER_ARRAYMASK iterator flag. This is equivalent to NPY_UINT8.
The default type to use when no dtype is explicitly specified, for example when calling np.zero(shape). This is equivalent to NPY_DOUBLE.
Other useful related constants are
The total number of built-in NumPy types. The enumeration covers the range from 0 to NPY_NTYPES-1.
A signal value guaranteed not to be a valid type enumeration number.
The start of type numbers used for Custom Data types.
The various character codes indicating certain types are also part of an enumerated list. References to type characters (should they be needed at all) should always use these enumerations. The form of them is NPY_{NAME}LTR where {NAME} can be
BOOL, BYTE, UBYTE, SHORT, USHORT, INT, UINT, LONG, ULONG, LONGLONG, ULONGLONG, HALF, FLOAT, DOUBLE, LONGDOUBLE, CFLOAT, CDOUBLE, CLONGDOUBLE, DATETIME, TIMEDELTA, OBJECT, STRING, VOID
INTP, UINTP
GENBOOL, SIGNED, UNSIGNED, FLOATING, COMPLEX
(unsigned) char
(unsigned) short
(unsigned) int
(unsigned) long int
(unsigned long long int)
(unsigned) Py_intptr_t (an integer that is the size of a pointer on the platform).
The enumeration value for the boolean type, stored as one byte. It may only be set to the values 0 and 1.
The enumeration value for an 8-bit/1-byte signed integer.
The enumeration value for a 16-bit/2-byte signed integer.
The enumeration value for a 32-bit/4-byte signed integer.
Equivalent to either NPY_INT or NPY_LONGLONG, depending on the platform.
The enumeration value for a 64-bit/8-byte signed integer.
The enumeration value for an 8-bit/1-byte unsigned integer.
The enumeration value for a 16-bit/2-byte unsigned integer.
The enumeration value for a 32-bit/4-byte unsigned integer.
Equivalent to either NPY_UINT or NPY_ULONGLONG, depending on the platform.
The enumeration value for a 64-bit/8-byte unsigned integer.
The enumeration value for a 16-bit/2-byte IEEE 754-2008 compatible floating point type.
The enumeration value for a 32-bit/4-byte IEEE 754 compatible floating point type.
The enumeration value for a 64-bit/8-byte IEEE 754 compatible floating point type.
The enumeration value for a platform-specific floating point type which is at least as large as NPY_DOUBLE, but larger on many platforms.
The enumeration value for a 64-bit/8-byte complex type made up of two NPY_FLOAT values.
The enumeration value for a 128-bit/16-byte complex type made up of two NPY_DOUBLE values.
The enumeration value for a platform-specific complex floating point type which is made up of two NPY_LONGDOUBLE values.
The enumeration value for a data type which holds dates or datetimes with a precision based on selectable date or time units.
The enumeration value for a data type which holds lengths of times in integers of selectable date or time units.
The enumeration value for ASCII strings of a selectable size. The strings have a fixed maximum size within a given array.
The enumeration value for UCS4 strings of a selectable size. The strings have a fixed maximum size within a given array.
The enumeration value for references to arbitrary Python objects.
Primarily used to hold struct dtypes, but can contain arbitrary binary data.
Some useful aliases of the above types are
The enumeration value for a signed integer type which is the same size as a (void *) pointer. This is the type used by all arrays of indices.
The enumeration value for an unsigned integer type which is the same size as a (void *) pointer.
The enumeration value of the type used for masks, such as with the NPY_ITER_ARRAYMASK iterator flag. This is equivalent to NPY_UINT8.
The default type to use when no dtype is explicitly specified, for example when calling np.zero(shape). This is equivalent to NPY_DOUBLE.
Other useful related constants are
The total number of built-in NumPy types. The enumeration covers the range from 0 to NPY_NTYPES-1.
A signal value guaranteed not to be a valid type enumeration number.
The start of type numbers used for Custom Data types.
The various character codes indicating certain types are also part of an enumerated list. References to type characters (should they be needed at all) should always use these enumerations. The form of them is NPY_{NAME}LTR where {NAME} can be
BOOL, BYTE, UBYTE, SHORT, USHORT, INT, UINT, LONG, ULONG, LONGLONG, ULONGLONG, HALF, FLOAT, DOUBLE, LONGDOUBLE, CFLOAT, CDOUBLE, CLONGDOUBLE, DATETIME, TIMEDELTA, OBJECT, STRING, VOID
INTP, UINTP
GENBOOL, SIGNED, UNSIGNED, FLOATING, COMPLEX