概述
文章
- 基础篇
- 进阶篇
- 其他篇
用户指南
NumPy 参考手册
- 数组对象
- 常量
- 通函数(ufunc)
- 常用 API
- 创建数组
- 数组处理程序
- 二进制运算
- 字符串操作
- C-Types 外部函数接口(numpy.ctypeslib)
- 时间日期相关
- 数据类型相关
- 可选的 Scipy 加速支持(numpy.dual)
- 具有自动域的数学函数( numpy.emath)
- 浮点错误处理
- 离散傅立叶变换(numpy.fft)
- 财金相关
- 实用的功能
- 特殊的 NumPy 帮助功能
- 索引相关
- 输入和输出
- 线性代数(numpy.linalg)
- 逻辑函数
- 操作掩码数组
- 数学函数(Mathematical functions)
- 矩阵库 (numpy.matlib)
- 杂项(Miscellaneous routines)
- 填充数组(Padding Arrays)
- 多项式(Polynomials)
- 随机抽样 (numpy.random)
- 操作集合(Set routines)
- 排序,搜索和计数(Sorting, searching, and counting)
- Statistics
- Test Support (numpy.testing)
- Window functions
- 打包(numpy.distutils)
- NumPy Distutils 用户指南
- NumPy C-API
- NumPy 的内部
- NumPy 和 SWIG
其他文档
System configuration
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.
Data type sizes
The NPY_SIZEOF_{CTYPE}
constants are defined so that sizeof information is available to the pre-processor.
NPY_SIZEOF_SHORT
sizeof(short)
NPY_SIZEOF_INT
sizeof(int)
NPY_SIZEOF_LONG
sizeof(long)
NPY_SIZEOF_LONGLONG
sizeof(longlong) where longlong is defined appropriately on the platform.
NPY_SIZEOF_PY_LONG_LONG
NPY_SIZEOF_FLOAT
sizeof(float)
NPY_SIZEOF_DOUBLE
sizeof(double)
NPY_SIZEOF_LONG_DOUBLE
sizeof(longdouble) (A macro defines NPY_SIZEOF_LONGDOUBLE as well.)
NPY_SIZEOF_PY_INTPTR_T
Size of a pointer on this platform (sizeof(void *)) (A macro defines NPY_SIZEOF_INTP as well.)
Platform information
NPY_CPU_X86
NPY_CPU_AMD64
NPY_CPU_IA64
NPY_CPU_PPC
NPY_CPU_PPC64
NPY_CPU_SPARC
NPY_CPU_SPARC64
NPY_CPU_S390
NPY_CPU_PARISC
New in version 1.3.0.
CPU architecture of the platform; only one of the above is defined.
Defined in
numpy/npy_cpu.h
NPY_LITTLE_ENDIAN
NPY_BIG_ENDIAN
NPY_BYTE_ORDER
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
.PyArray_GetEndianness
()New in version 1.3.0.
Returns the endianness of the current platform. One of
NPY_CPU_BIG
,NPY_CPU_LITTLE
, orNPY_CPU_UNKNOWN_ENDIAN
.
Compiler directives
NPY_LIKELY
NPY_UNLIKELY
NPY_UNUSED
Interrupt Handling
NPY_INTERRUPT_H
NPY_SIGSETJMP
NPY_SIGLONGJMP
NPY_SIGJMP_BUF
NPY_SIGINT_ON
NPY_SIGINT_OFF
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论