sklearn FutureWarning: numpy not_equal will not check..., The comparison did not return the same
生活随笔
收集整理的這篇文章主要介紹了
sklearn FutureWarning: numpy not_equal will not check..., The comparison did not return the same
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. 問題
import sklearn 后有如下警告
ubuntu@test:/data/# python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
/usr/local/lib/python2.7/dist-packages/sklearn/utils/fixes.py:313: FutureWarning: numpy not_equal will not check object identity in the future. The comparison did not return the same result as suggested by the identity (`is`)) and will change._nan_object_mask = _nan_object_array != _nan_object_array
>>> import sklearn
>>> sklearn.__version__
'0.20.0'
>>> exit()
2. 解決方法
sudo pip uninstall numpy
sudo pip install numpy==1.16.1
總結
以上是生活随笔為你收集整理的sklearn FutureWarning: numpy not_equal will not check..., The comparison did not return the same的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 自驾一次西藏,需要花费多少钱?
- 下一篇: Python 精选笔试面试习题—sort