你好,我想有一个这样的数组(1):
import numpy as np
A = np.array([ (1, 2, 9.799, 4.7, 4.77, 148929.0, 450030016.0),
(11, 21, 91.799, 41.7, 41.77, 1489129.0, 4500130016.0),
(41, 25, 93.799, 74.7, 94.77, 1487929.0, 4500340016.0)],
dtype = [('a', '<i4'), ('z', '<f4'), ('e', '<f4'), ('r', '<f4'), ('t', '<f4'), ('y', '<f4'), ('u', '<f4')])
使用此项:
A = np.array([])
A = np.append(A,(1, 2, 9.799, 4.7, 4.77, 148929.0, 450030016.0))
A = np.append(A,(11, 21, 91.799, 41.7, 41.77, 1489129.0, 4500130016.0))
A = np.append(A,(41, 25, 93.799, 74.7, 94.77, 1487929.0, 4500340016.0))
但问题是我只能
array([ 1, 2, 9.799, 4.7, 4.77, 148929.0, 450030016.0,
11, 21, 91.799, 41.7, 41.77, 1489129.0, 4500130016.0,
41, 25, 93.799, 74.7, 94.77, 1487929.0, 4500340016.0 ])
没有像(1)那样的括号,我也不知道如何修复数据类型这样做
非常感谢你的帮助
使用此选项:
相关问题 更多 >
编程相关推荐