cupyx.scipy.spatial.distance.minkowski#

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

Compute the Minkowski distance between two 1-D arrays.

Parameters
  • u (array_like) – Input array of size (N,)

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

  • p (float) – The order of the norm of the difference \({\|u-v\|}_p\). Note that for \(0 < p < 1\), the triangle inequality only holds with an additional multiplicative factor, i.e. it is only a quasi-metric.

Returns

The Minkowski distance between vectors u and v.

Return type

minkowski (double)