ott.geometry.costs.Cosine.all_pairs_pairwise#

Cosine.all_pairs_pairwise(x, y)#

Compute matrix of all pairwise costs, excluding the norms.

Parameters
  • x (Array) – Array of shape [n, ...].

  • y (Array) – Array of shape [m, ...].

Return type

Array

Returns

Array of shape [n, m] of cost evaluations.