Return the mean over dimensions while keeping their coordinates.
Dimensions removed from the data are retained as scalar coordinates with the
mean of their coordinate values. Numeric coordinates that depend on reduced
dimensions are averaged as well.
Parameters:
dim (str | Sequence[Hashable] | None, default: None) – The dimension(s) along which to average the data. If None, all dimensions
are averaged.
Returns:
DataArray – The data averaged along the specified dimension(s).