成功解决IndexError: arrays used as indices must be of integer (or boolean) type
生活随笔
收集整理的這篇文章主要介紹了
成功解决IndexError: arrays used as indices must be of integer (or boolean) type
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
成功解決IndexError: arrays used as indices must be of integer (or boolean) type
目錄
解決問題
解決思路
解決方法
解決問題
IndexError: arrays used as indices must be of integer (or boolean) type
解決思路
索引錯誤:用作索引的數組必須是整數(或布爾)類型
解決方法
將
t ? ?#類型為numpy.ndarray改為
t.astype('int64')哈哈,大功告成!
總結
以上是生活随笔為你收集整理的成功解决IndexError: arrays used as indices must be of integer (or boolean) type的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DL之DNN:自定义2层神经网络TwoL
- 下一篇: 成功解决IndexError: shap