scikit-learn/scikit-learn — pull request #3746 by MechCoder (2014-10-09 15:23:14+00:00)
Title: FIX: Thresholded Nearest Centroid fails with non-encoded y

Minimal code:

X = [[-2, -1], [-1, -1], [-1, -2], [1, 1], [1, 2], [2, 1]]
y = ["r", "r", "r", "b", "b", "b"]
clf = NearestCentroid(shrink_threshold=0.01)
IndexError: arrays used as indices must be of integer (or boolean) type