8.5.常量
import numpy as np
Windows 10
Python 3.8.8 @ MSC v.1928 64 bit (AMD64)
Latest build date 2021.03.09
numpy version: 1.20.1
NumPy 定义了几个常量(都是IEEE 754 浮点表示):
| Attributes |Values |Annotations
| :-------------- |:------------------ |:-------------------
| np.inf |inf |正无穷大
| np.Inf |inf |alias of inf
| np.infty |inf |alias of inf
| np.Infinity |inf |alias of inf
| np.PINF |inf |alias of inf
| np.NINF |-inf |负无穷大
| np.nan |nan |非数字: Not a Number
| np.NAN |nan |alias of nan
| np.NaN |nan |alias of nan
| np.NZERO |-0.0 |负零
| np.PZERO |0.0 |正零
| np.e |2.718281828459045 |自然底数/纳皮尔常数
| np.euler_gamma |0.5772156649015329 |欧拉常数
| np.pi |3.141592653589793 |圆周率
| np.newaxis |None |新轴/None别名