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