When NumPy is built, information about system configuration is recorded, and is made available for extension modules using Numpy’s C API. These are mostly defined in numpyconfig.h (included in ndarrayobject.h). The public symbols are prefixed by NPY_*. Numpy also offers some functions for querying information about the platform in use.
For private use, Numpy also constructs a config.h in the NumPy include directory, which is not exported by Numpy (that is a python extension which use the numpy C API will not see those symbols), to avoid namespace pollution.
The NPY_SIZEOF_{CTYPE} constants are defined so that sizeof information is available to the pre-processor.
New in version 1.3.0.
CPU architecture of the platform; only one of the above is defined.
Defined in numpy/npy_cpu.h
New in version 1.3.0.
Portable alternatives to the endian.h macros of GNU Libc. If big endian, NPY_BYTE_ORDER == NPY_BIG_ENDIAN, and similarly for little endian architectures.
Defined in numpy/npy_endian.h.
New in version 1.3.0.
Returns the endianness of the current platform. One of NPY_CPU_BIG, NPY_CPU_LITTLE, or NPY_CPU_UNKNOWN_ENDIAN.