ott.geometry.grid.Grid.apply_kernel#

Grid.apply_kernel(scaling, eps=None, axis=None)[source]#

Apply grid kernel on scaling vector.

See notes in parent class for use.

Reshapes scaling vector as a grid, applies kernels onto each slice, and then ravels backs the output as a vector.

More implementation details in [Schmitz et al., 2018],

Parameters
  • scaling (ndarray) – jnp.ndarray, a vector of scaling (>0) values.

  • eps (Optional[float]) – float, regularization strength

  • axis (Optional[int]) – axis (0 or 1) along which summation should be carried out.

Return type

ndarray

Returns

a vector, the result of kernel applied onto scaling.