DeprecationWarning: np.float is a deprecated alias for the builtin float

1. 报错截图

DeprecationWarning: np.float is a deprecated alias for the builtin float_第1张图片

2. 报错代码

DeprecationWarning: np.float is a deprecated alias for the builtin float_第2张图片

3. 报错原因

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

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

4. 解决方法

使用float替代np.float

DeprecationWarning: np.float is a deprecated alias for the builtin float_第3张图片

你可能感兴趣的:(Error,&,Warring,python)