np.int报错如下:DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe.


原因在于np.int在numpy1.20已经被废弃掉了,具体可以参考:https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

修改方法:

将 np.int 改为 np.int_ 或者 np.int32 或者 np.int64 。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM