Python:TypeError:列表索引必须是整数或切片,而不是元组

时间:2019-11-25 16:41:06

标签: python

建筑张量

V_High  = np.array( [np.ones(N)] )
V_Low   = np.array( [np.ones(N)] )
V_Close = np.array( [np.ones(N)] )
for i in range(M-1):
    V_High = np.vstack((V_High, Database[i][t+Starting_index-N:t+Starting_index,1]))
    V_Low = np.vstack((V_Low, Database[i][t+Starting_index-N:t+Starting_index,2]))
    V_Close = np.vstack((V_Close, Database[i][t+Starting_index-N:t+Starting_index,3]))
x_t = np.stack( ( V_High, V_Low, V_Close), axis = 2 )
x_t = x_t.reshape( 1, M, N, Feature)

回溯(最近通话最近一次):

V_High = np.vstack((V_High, Database[i][t+Starting_index-N:t+Starting_index,1]))

TypeError:列表索引必须是整数或切片,而不是元组

我应该如何解决此错误?

0 个答案:

没有答案