The metric to use when calculating distance between instances in a
feature array. If metric is a string, it must be one of the options
specified in PAIRED_DISTANCES, including “euclidean”,
“manhattan”, or “cosine”.
Alternatively, if metric is a callable function, it is called on each
pair of instances (rows) and the resulting value recorded. The callable
should take two arrays from X as input and return a value indicating
the distance between them.
**kwds : dict
Unused parameters.
Returns:
distances : ndarray of shape (n_samples,)
Returns the distances between the row vectors of X
and the row vectors of Y, where distances[i] is the
distance between X[i] and Y[i].