成功解决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
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
成功解決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) #修改列表的內容使其不為空列表即可!大功告成!哈哈!
總結
以上是生活随笔為你收集整理的成功解决IndexError: index 0 is out of bounds for axis 1 with size 0的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 成功解决ValueError: min_
- 下一篇: 成功解决ImportError: [jo