fix #3908

https://github.com/scikit-learn/scikit-learn/issues/3908