Fixes Issue 2751

Fixes https://github.com/scikit-learn/scikit-learn/issues/2751 .