-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Milestone
Description
Multi-dimensional grouped operations should be relatively straightforward -- the main complexity will be writing an N-dimensional concat that doesn't involve repetitively copying data.
The idea with group_over would be to support groupby operations that act on a single element from each of the given groups, rather than the unique values. For example, ds.group_over(['lat', 'lon']) would let you iterate over or apply to 2D slices of ds, no matter how many dimensions it has.
Roughly speaking (it's a little more complex for the case of non-dimension variables), ds.group_over(dims) would get translated into ds.groupby([d for d in ds.dims if d not in dims]).
Related: #266
hmaarrfk, mschrimpf, max-sixty, wmayner, WardBrian and 15 more