bundles / scipy 1.17.1 / scipy / spatial / distance / chebyshev
function
scipy.spatial.distance:chebyshev
source: /scipy/spatial/distance.py :1041
Signature
def chebyshev ( u , v , w = None ) Summary
Compute the Chebyshev distance.
Extended Summary
The Chebyshev distance between real vectors and is defined as [1]
If a (non-negative) weight vector is supplied, the weighted Chebyshev distance is defined to be the weighted Minkowski distance of infinite order; that is,
Parameters
u: (N,) array_like of floatsInput vector.
v: (N,) array_like of floatsInput vector.
w: (N,) array_like of floats, optionalWeight vector. Default is
None, which gives all pairs the same weight1.0.
Returns
chebyshev: floatThe Chebyshev distance between vectors
uandv, optionally weighted byw.
Examples
from scipy.spatial import distance
✓distance.chebyshev([1, 0, 0], [0, 1, 0]) distance.chebyshev([1, 1, 0], [0, 1, 0])✗
Aliases
-
scipy.spatial.distance.chebyshev