scipy.spatial.distance.sqeuclidean

scipy.spatial.distance.sqeuclidean(u, v)[source]

Computes the squared Euclidean distance between two n-vectors u and v, which is defined as

{||u-v||}_2^2.

Parameters :

u : ndarray

An n-dimensional vector.

v : ndarray

An n-dimensional vector.

Returns :

d : double

The squared Euclidean distance between vectors u and v.

Previous topic

scipy.spatial.distance.sokalsneath

Next topic

scipy.spatial.distance.yule