TypeError: 'numpy.float64' object cannot be interpreted as an integer

发布时间 2023-05-06 15:52:29作者: 化繁为简,弃快从慢

报错内容:

Traceback (most recent call last):
File "C:\Users\xuan\.conda\envs\pytorch1-6\lib\site-packages\scipy\sparse\_sputils.py", line 225, in isintlike
operator.index(x)
TypeError: 'numpy.float64' object cannot be interpreted as an integer

解决方法:

当前版本的numpy不支持使用浮点数作为步长,需要降低numpy版本。