ott.solvers.utils.sample_joint

Contents

ott.solvers.utils.sample_joint#

ott.solvers.utils.sample_joint(rng, tmat)[source]#

Sample jointly from a transport matrix.

Parameters:
  • rng (Array) – Random number generator.

  • tmat (Array) – Transport matrix of shape [n, m].

Return type:

Tuple[Array, Array]

Returns:

Source and target indices of shape [n,] and [m,], respectively.