xarray.core.rolling.DatasetRolling.reduce#
- DatasetRolling.reduce(func, keep_attrs=None, **kwargs)[source]#
Reduce the items in this group by applying func along some dimension(s).
- Parameters:
func (
callable()
) β Function which can be called in the form func(x, **kwargs) to return the result of collapsing an np.ndarray over an the rolling dimension.keep_attrs (
bool
, default:None
) β If True, the attributes (attrs
) will be copied from the original object to the new one. If False, the new object will be returned without attributes. If None uses the global default.**kwargs (
dict
) β Additional keyword arguments passed on to func.
- Returns:
reduced (
DataArray
) β Array with summarized data.