IndexError:numpy的“数组的索引太多了”

时间:2017-02-02 14:53:00

标签: python arrays numpy

np_data =  np.array([['WORKING', '32398', 'PATTERN', '1\n'],
                     ['SUBMIT', ' 12398', 'CHECKSUM', '1\n']], dtype=object)
col1 = np_data[:, 1]

得到错误:IndexError:'数组'的索引太多了

np_data.shape

o / p:(2,)

np_data[0][0]
np_data[1][0]

O / P:    工作,    SUBMIT

任何解决方案? 提前致谢

0 个答案:

没有答案
相关问题