This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / spatial / distance / _distance / seuclidean

function

scipy.spatial.distance._distance:seuclidean

source: build-install/usr/lib/python3.14/site-packages/scipy/spatial/distance/_distance.py:830

Signature

def seuclidean(u, v, V)

Summary

Return the standardized Euclidean distance between two 1-D arrays.

Extended Summary

The standardized Euclidean distance between two n-vectors u and v is

V is the variance vector; V[I] is the variance computed over all the i-th components of the points. If not passed, it is automatically computed.

Parameters

u : (N,) array_like

Input array.

v : (N,) array_like

Input array.

V : (N,) array_like

V is a 1-D array of component variances. It is usually computed among a larger collection of vectors.

Returns

seuclidean : double

The standardized Euclidean distance between vectors u and v.

Examples

from scipy.spatial import distance
✓
distance.seuclidean([1, 0, 0], [0, 1, 0], [0.1, 0.1, 0.1])
distance.seuclidean([1, 0, 0], [0, 1, 0], [1, 0.1, 0.1])
distance.seuclidean([1, 0, 0], [0, 1, 0], [10, 0.1, 0.1])
✗
np.float64(3.178049716414141)

Aliases

  • scipy.spatial.distance.seuclidean