This is documentation for an old release of SciPy (version 0.17.0). Read this page in the documentation of the latest stable release (version 1.15.1).
scipy.spatial.distance.minkowski¶
- scipy.spatial.distance.minkowski(u, v, p)[source]¶
Computes the Minkowski distance between two 1-D arrays.
The Minkowski distance between 1-D arrays u and v, is defined as
||u−v||p=(∑|ui−vi|p)1/p.Parameters: u : (N,) array_like
Input array.
v : (N,) array_like
Input array.
p : int
The order of the norm of the difference ||u−v||p.
Returns: d : double
The Minkowski distance between vectors u and v.