【Python报错解决方案】DeprecationWarning: `np.float` is a deprecated

报错amoconda libsite-packages sklearn linear model least ngl.py30: Deprecationmarming: mp.float is a deprecated alias for the builtinfloat , To silence this warning, wse flat by itself. Doing this will not modify amy behavior and is safe. If you specifically wanted thenumpy scalar type, use np. float64 here.

解决方法1:升级scikit-learn版本

conda update scikit-learn

解决方法2:

在Anaconda Prompt里
(1)pip uninstall Scikit-learn
(2)pip install Scikit-learn

猜你喜欢

转载自blog.csdn.net/toby001111/article/details/132709477