(已解决)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替代。

 改为

(已解决)DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`._第1张图片

 

 

你可能感兴趣的:(调试代码的一些错误解决,python,numpy,开发语言)