regrid_from_weights#

regridding.regrid_from_weights(weights, shape_input, shape_output, values_input, values_output=None, axis_input=None, axis_output=None)[source]#

Regrid an array of values using weights computed by regridding.weights().

Parameters:
  • weights (ndarray) – Ragged array of weights computed by regridding.weights().

  • shape_input (tuple[int, ...]) – Broadcasted shape of the input coordinates computed by regridding.weights().

  • shape_output (tuple[int, ...]) – Broadcasted shape of the output coordinates computed by regridding.weights().

  • values_input (ndarray) – Input array of values to be resampled.

  • values_output (None | ndarray) – Optional array in which to place the output.

  • axis_input (None | int | Sequence[int]) – Logical axes of the input array to resample. If None, resample all the axes of the input array. The number of axes should be equal to the number of coordinates in the original input grid passed to regridding.weights().

  • axis_output (None | int | Sequence[int]) – Logical axes of the output array corresponding to the resampled axes of the input array. If None, all the axes of the output array correspond to resampled axes in the input grid. The number of axes should be equal to the original number of coordinates in the output grid passed to regridding.weights().

Return type:

ndarray