scikit-learn/scikit-learn — pull request #2941 by perimosocordiae (2014-03-06 23:16:50+00:00)
Title: BUG: avoid NaNs throwing off class probabilities

In the case where `neigh_dist` includes at least one zero and `self.weights` is 'distance', some values of `weights` may be infinite.
This is ok, except for when normalizing `proba_k`, when it creates some pernicious NaN values.