`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
从上述报错中我们可以看出得到的信息是在‘np.int’是内置‘int’的已弃用别名,据分析numpy.int在1.20版本开始就已经被官方替代但在1.24之前都还能进行使用。
目前的两种解决办法是:
1、 将 np.int 替换为 np.int_
2、 更换numpy的版本(据分析1.24之前的版本就行,我自己使用的版本为1.23.5)
pip install numpy==1.23.5