class sklearn.neighbors.DistanceMetric
DistanceMetric class This class provides a uniform interface to fast distance metric functions. The various metrics can be accessed via the get_metric class method and the metric string identifier (see below). For example, to use the Euclidean distance: >>> dist = DistanceMetric.get_metric('euclidean')
>>> X = [[0, 1, 2],
[3, 4, 5]])
>>> dist.pairwise(X)
array([[ 0. , 5.19615242],
[ 5.19615242, 0.