SciPy

This is documentation for an old release of SciPy (version 0.14.0). Read this page in the documentation of the latest stable release (version 1.15.0).

scipy.spatial.distance.euclidean

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

Computes the Euclidean distance between two 1-D arrays.

The Euclidean distance between 1-D arrays u and v, is defined as

{||u-v||}_2

Parameters:

u : (N,) array_like

Input array.

v : (N,) array_like

Input array.

Returns:

euclidean : double

The Euclidean distance between vectors u and v.