成功解决TypeError: slice indices must be integers or None or have an __index__ method
生活随笔
收集整理的這篇文章主要介紹了
成功解决TypeError: slice indices must be integers or None or have an __index__ method
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
成功解決TypeError: slice indices must be integers or None or have an __index__ method
?
目錄
解決問題
解決思路
解決方法
?
?
解決問題
TypeError: slice indices must be integers or None or have an __index__ method
?
?
解決思路
類型錯誤:切片索引必須是整數或無,或者有一個__index__ 的方法
?
?
解決方法
對要切分的數值,進行整數轉換
比如,
num
改為
int(num)
哈哈,大功告成!
?
?
?
總結
以上是生活随笔為你收集整理的成功解决TypeError: slice indices must be integers or None or have an __index__ method的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DL之DNN:利用MultiLayerN
- 下一篇: DL之DNN:自定义MultiLayer