mathiver/scikit-learn — comment on commit 80ef67bef3072c3d0500d071745528261d45f4cd
File: sklearn/neighbors/base.py line 206
By jakevdp:

I'd do a check here: if p=2, then call `euclidean distances` as before (it can be a lot faster). Otherwise call `pairwise distances` as you have it