IndexError: index 37 is out of bounds for axis 1 with size 37 请求各位专家看下如何解决?

我自定义程序FC,跑到 x = x_train[:, i].reshape(-1, 1) 时收到报错信息:
IndexError: index 37 is out of bounds for axis 1 with size 37
请教如何解决此类问题?
感谢!

img

img

数组越界异常。
x_train这个列表大小是37,取不到索引37对应的值。