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版本;

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

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>