2020-08-19
阅读量:
1168
python 中的 type(), dtype(), astype()
| 函数 | 说明 |
| type() | 返回数据结构类型(list、dict、numpy.ndarray 等) |
| dtype() | 返回数据元素的数据类型(int、float等) 备注:1)由于 list、dict 等可以包含不同的数据类型,因此不可调用dtype()函数 2)np.array 中要求所有元素属于同一数据类型,因此可调用dtype()函数 |
| astype() | 改变np.array中所有数据元素的数据类型。 备注:能用dtype() 才能用 astype() |
27.6909
2
0
关注作者
收藏
评论(0)
发表评论
暂无数据

