scikit-learn/scikit-learn — pull request #3857 by MechCoder (2014-11-17 17:34:26+00:00)
Title: Warn when sparse matrix is supplied to predict in KNeighborsClassifier

In https://github.com/scikit-learn/scikit-learn/pull/3802

There might be cases when I predict on sparse data, after fitting on dense data (the centroids). Is it okay to densify the sparse matrix supplied to the predict method (with a warning), or should I just resort to using algorithm="brute" over here, https://github.com/scikit-learn/scikit-learn/pull/3802/files#diff-1741ad6b05f1eb0fd71af8bad0e001c7R484