cupyx.scipy.spatial.distance.euclidean#

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

Compute the Euclidean distance between two 1-D arrays.

The Euclidean distance is defined as

\[d(u, v) = \left(\sum_{i} (u_i - v_i)^2\right)^{\sfrac{1}{2}}\]
Parameters:
  • u (array_like) – Input array of size (N,)

  • v (array_like) – Input array of size (N,)

Returns:

The Euclidean distance between vectors u and v.

Return type:

euclidean (double)