解决 IndexError: arrays used as indices must be of integer (or boolean) type 程序员文章站 2022-06-12 22:46:16 ... 使用sklearn处理数据,进行数据标签分类转化,报错如下: Traceback (most recent call last): File “.py", line 67, in pa = le.ina(pa) File "/rel.py”, line 14, in inform return s*s_[y] IndexError: arrays used as indices must be of integer (or boolean) type 解决方法: s = s.astype('int64') s = le.inverse_transform(s) 相关标签: sklearn 上一篇: python3 | 函数 下一篇: 用Excel计算一个人的年龄从当天开始倒推算出一个人的年龄 推荐阅读 解决 IndexError: arrays used as indices must be of integer (or boolean) type