Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cubed arrays to be passed to flox groupby #7941

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

TomNicholas
Copy link
Member

@TomNicholas TomNicholas commented Jun 25, 2023

Generalizes a small check for chunked arrays in groupby so it now allows cubed arrays through to flox rather than just dask arrays. Does not actually mean that flox groupby will work with cubed yet though, see cubed-dev/cubed#223 and xarray-contrib/flox#224

  • Should have been done in Generalize handling of chunked array types #7019
  • Tests added (The place to test this would be in [cubed-xarray]
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

@TomNicholas TomNicholas added the topic-chunked-arrays Managing different chunked backends, e.g. dask label Jun 25, 2023
@TomNicholas TomNicholas changed the title fix error raised by ruff Allow cubed arrays to be passed to groupby Jun 25, 2023
Comment on lines +25 to +26
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any, Callable
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was supposed to be a separate commit, but this was only because ruff raised an error after regenerating the _aggregations.py file.

@TomNicholas TomNicholas changed the title Allow cubed arrays to be passed to groupby Allow cubed arrays to be passed to flox groupby Jun 25, 2023
@TomNicholas TomNicholas merged commit e5071aa into pydata:main Jun 26, 2023
@TomNicholas TomNicholas deleted the cubed_groupby branch June 26, 2023 15:28
dstansby pushed a commit to dstansby/xarray that referenced this pull request Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-chunked-arrays Managing different chunked backends, e.g. dask
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants