Is your feature request related to a problem?
If I'm not mistaken, flox does support median/nanmedian aggregation for groupby reduce operations. But currently, while Xarray's docs indicates that median reduction on groupbys should use flox when available, I'm not sure this is actually implemented:
|
return self.reduce( |
|
duck_array_ops.median, |
|
dim=dim, |
|
skipna=skipna, |
|
keep_attrs=keep_attrs, |
|
**kwargs, |
|
) |
I'm happy to open a PR if median-reductions should indeed use flox when available!
Describe the solution you'd like
Median-reduction on groupbys should use flox when available.
Describe alternatives you've considered
No response
Additional context
Currently, I resort to using flox's xarray_reduce function directly, which dramatically speeds up median-reduction.
Is your feature request related to a problem?
If I'm not mistaken, flox does support median/nanmedian aggregation for groupby reduce operations. But currently, while Xarray's docs indicates that median reduction on groupbys should use flox when available, I'm not sure this is actually implemented:
xarray/xarray/core/_aggregations.py
Lines 7807 to 7813 in 885e8d1
I'm happy to open a PR if median-reductions should indeed use flox when available!
Describe the solution you'd like
Median-reduction on groupbys should use flox when available.
Describe alternatives you've considered
No response
Additional context
Currently, I resort to using flox's
xarray_reducefunction directly, which dramatically speeds up median-reduction.