- IndexVariable.reduce(func, dim=None, axis=None, keep_attrs=None, keepdims=False, **kwargs)#
Reduce this array by applying func along some dimension(s).
callable()) – Function which can be called in the form func(x, axis=axis, **kwargs) to return the result of reducing an np.ndarray over an integer valued axis.
int, optional) – Axis(es) over which to apply func. Only one of the ‘dim’ and ‘axis’ arguments can be supplied. If neither are supplied, then the reduction is calculated over the flattened array (by calling func(x) without an axis argument).
bool, optional) – If True, the variable’s attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
dict) – Additional keyword arguments passed on to func.
Array) – Array with summarized data and the indicated dimension(s) removed.