热线电话:13121318867

登录
2019-01-10 阅读量: 544
numpy的数据类型(2)

输出:

INT16

# Python Program to create a data type object

# containing a 32 bit big-endian integer

import numpy as np

# i4 represents integer of size 4 byte

# > represents big-endian byte ordering and

# < represents little-endian encoding.

# dt is a dtype object

dt = np.dtype('>i4')

print("Byte order is:",dt.byteorder)

print("Size is:",dt.itemsize)

print("Data type is:",dt.name)

输出:

字节顺序是:>
大小是:4
数据类型的名称是:int32
120.0000
2
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子