Closed dcherian closed 3 weeks ago
To illustrate what I want to do with the mode aggregation I created this gist: https://gist.github.com/BSchilperoort/67ccfbb7f6d0e0b9a8df069c41a5db24
You can run it if you have xarray-regrid
, zarr
, and gcsfs
installed. The notebook runs on the latest release of flox. This method works, but gets very memory hungry with input data at a finer resolution.
If I check out this branch, and rerun the notebook, the reduction fails with the following error (but I guess this PR is still very WIP?):
```py File ~/micromamba/envs/xarray_regrid_3.12/lib/python3.12/site-packages/flox/aggregations.py:147, in _atleast_1d(inp, min_length) 145 if xrutils.is_scalar(inp): 146 inp = (inp,) * min_length --> 147 assert len(inp) >= min_length 148 return inp ```
This is some WIP work, that it would be good to take over the finish line
cc @BSchilperoort