xray.DataArray.mean¶
- DataArray.mean(dimension=None, axis=None, **kwargs)¶
Reduce this DataArray’s data’ by applying numpy.mean along some dimension(s).
Parameters: dimension : str or sequence of str, optional
Dimension(s) over which to apply numpy.mean.
axis : int or sequence of int, optional
Axis(es) over which to apply numpy.mean. Only one of the ‘dimension’ and ‘axis’ arguments can be supplied. If neither are supplied, then numpy.mean is calculated over the flattened array (by calling numpy.mean(x) without an axis argument).
**kwargs : dict
Additional keyword arguments passed on to numpy.mean.
Returns: reduced : DataArray
New DataArray object with numpy.mean applied to its data and the indicated dimension(s) removed.