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 。

posted @ 2021-09-29 17:48  CrazyJhq  阅读(18577)  评论(0编辑  收藏  举报