为什么会出现“ IndexError:元组索引超出范围”?

时间:2019-02-21 19:27:38

标签: python compiler-errors reshape

为什么我会收到下面的错误消息以获取以下代码:

X_test = []
for i in range(60, 90):
    X_test.append(inputs[i-60:i, 0])
X_test = np.array(X_test)
X_test = np.reshape(X_test, (X_test.shape[0], X_test.shape[1], 1))
  

X_test = np.reshape(X_test,(X_test.shape [0],X_test.shape [1],1))

     

IndexError:元组索引超出范围

为什么for循环不能生成30 * 60的矩阵?

0 个答案:

没有答案