当前位置:   article > 正文

(已解决)DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`.

deprecationwarning: `np.float` is a deprecated alias for the builtin `float`

DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

看了一个博主解释了一下:

弃用警告:np.float是内置float的不推荐别名。要去除这个Warning,需要单独使用float

人话:np.float是将要被弃用的,可以用float替代。

 改为

 

 

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号