【发布时间】:2016-05-25 20:55:17
【问题描述】:
执行
import numpy as np
t1 = np.arange(1,10)
t2 = np.arange(11,20)
t3 = np.concatenate((t1,t2),axis=1)
导致
Traceback (most recent call last):
File "<ipython-input-264-85078aa26398>", line 1, in <module>
t3 = np.concatenate((t1,t2),axis=1)
IndexError: axis 1 out of bounds [0, 1)
为什么会报告轴 1 超出范围?
【问题讨论】:
标签: arrays numpy concatenation numpy-ndarray index-error