数据类型及数组创建
1.np.nan是一个空值,并且np.nan!=np.nan
2.np.isnan(x)用于判断x==nan? 返回值为boolean
3.正无穷大:np.inf 圆周率:np.pi 自然底数:np.e
4.对应类型为type,备注为dtype,另注:np.type返回的是数据结构的类型,np.dtype返回的是数据元素的类型,见下代码片段。
![对应类型为type,备注为dtype](https://i-blog.csdnimg.cn/blog_migrate/eb5c2c95129c27990b985e0f3eb94aad.png)
a = np.dtype('b1')
print(a.type) # <class 'numpy.bool_'>
print(a.itemsize) # 1
import numpy