赞
踩
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
替代。
即
改为
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。