完美解决IndexError: index 0 is out of bounds for axis 1 with size 0


问题描述

IndexError: index 0 is out of bounds for axis 1 with size 0


原因分析

  查看列表,输出列表内容,查看列表的形状,发现列表的确是空值,所以需要修改列表中的内容。

print(List.shape)

解决方案

y = train_np[:, 0]
print(train_np)  

猜你喜欢

转载自blog.csdn.net/weixin_43283397/article/details/109408468