cupyx.scipy.spatial.distance.sqeuclidean#

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

Compute the squared Euclidean distance between two 1-D arrays.

The squared Euclidean distance is defined as

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

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

Returns:

The squared Euclidean distance between vectors u and v.

Return type:

sqeuclidean (double)