Numpy报错:AttributeError: module ‘numpy‘ has no attribute ‘int‘

一,报错bug

运行代码出现以下numpy报错

  AttributeError: module 'numpy' has no attribute 'int'

二,报错原因

很大可能是python或numpy版本导致的。

三,解决方法

1,可先尝试将报错的地方进行如下修改:

将numpy.int更改为numpy.int_

2,若不可行,则更换python或numpy版本;

注:有任何问题欢迎评论区交流讨论!

猜你喜欢

转载自blog.csdn.net/m0_47026232/article/details/128887778
今日推荐