scikit-learn/scikit-learn — pull request #3750 by MechCoder (2014-10-10 12:03:29+00:00)
Title: [MRG] : Bug fix in computing the dataset_centroid in NearestCentroid

Continuation of work in https://github.com/scikit-learn/scikit-learn/pull/3746.
There is a bug in L111 of the current code, where the mean of the first feature is taken as the centroid.

A bit more of minor numpy vectorization and code optimizations were added. I also added a test to verify the behavior that fails in master.