I am trying to silence the DeprecationWarning with the following method.
import warnings
warnings.filterwarnings(action='ignore')
from sklearn.ensemble import RandomForestRegressor
However, it still shows:
DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d
Why does this happen, and how can I fix it?
I'm running this on python 3.6.6, numpy 1.15.0 and scikit-learn 0.19.2, and adding category=DeprecationWarning didn't help.