Originally, I didn't think we needed this in Xarray-Beam,
because you could aggregate over dimensions on each
chunk, and then use xbeam.Mean.PerKey(). xbeam.Mean()
is an improvement for two reasons:
It requires less user code: no need to take mean
twice and update the key
It's less error prone: it computes the correct
answer, even if dimension(s) being reduced over
have different lengths on different chunks.
High-level xarray_beam.Mean() transform
This makes it easy to write high-level aggregations of distributed Xarray-Beam datasets, e.g.,
Originally, I didn't think we needed this in Xarray-Beam, because you could aggregate over dimensions on each chunk, and then use xbeam.Mean.PerKey(). xbeam.Mean() is an improvement for two reasons:
I'll update narrative docs in a follow-on.