scikit-learn/scikit-learn — pull request #1563 by kuantkid (2013-01-11 04:02:32+00:00)
Title: KNN graph fails for sparse inputs

In IRC, @fmailhot reports `LabelSpreading` fails for sparse inputs. The reason seems to be in buidling knn graph, `np.asarray` converts sparse matrix to matrix of objects and should be replaced by `safe_asarray`.