scallops.xr.iter_data_array
- scallops.xr.iter_data_array(array, dims, func, missing_dims='ignore')
Call a function for all combinations of the values for the given dimensions.
- Parameters:
array (DataArray) – The data array
dims (list[str]) – List of dimensions to apply the function over
missing_dims (Literal['ignore', 'error']) – Whether to ignore or raise error for missing dims
func (Callable[[DataArray, dict], None]) – The function to apply. Invoked with the sliced DataArray and selector used to create the slice.