ott.math.velocity_from_brenier_potential

ott.math.velocity_from_brenier_potential#

ott.math.velocity_from_brenier_potential(potential, **kwargs)[source]#

Get optimal time-dependent velocity field from Brenier potential.

The solution is computed numerically using a Legendre transform.

Parameters:
Return type:

Callable[[Array, Array], Array]

Returns:

A time-parameterized velocity field vel(t, x) that expects time array of shape [n,] and inputs of shape [n, d].