)
x
# array([0, 1, 2, 3, 4, 5, 6, 7])
# x 是一维数组,步长为 1,因为 int8 占一个字节
x.strides
# (1,)
# data 属性可以观察原始数据...(记录)
x[0]
# (1, 0.5, 'NumPy')
# 还可以通过字段名称访问
# 得到的是字段值的数组
x['f2']
# array(['NumPy', 'Essential'], dtype...Essential')],
dtype=[('id', '<i4'), ('value', '<f4'), ('note', 'S10')])
'''
# 也可以使用字典来表示类型
# names 键是名称列表...,formats 键是类型列表
dict_ex = np.zeros((2,), dtype = {'names':['id', 'value'], 'formats':['i4', '2f4']})...(2015, 2, 1),
datetime.date(2015, 3, 1)]
'''
# datetime64 的 item 方法会返回等价的 datetime.date 对象
[element.item