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

more reduction tests #11

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

keewis
Copy link
Contributor

@keewis keewis commented Sep 25, 2024

This adds a few more reduction (or index reduction) tests, which should cover everything xarray supports and which is part of the array API. xarray additionally provides sorting-based reductions like quantile and median, plus rank which I don't quite understand.

@keewis
Copy link
Contributor Author

keewis commented Sep 28, 2024

looks like numpy<2.1 didn't have cumulative_sum, so we'll have to wait until xarray supports numpy=2.1 (i.e. whenever we get around to releasing a new version).

We could probably merge all, any, min, and max into the main reduce test, but I do like the clear separation that gives us (even though we duplicate the code twice).

Other than that, this should be ready for review, @TomNicholas

@keewis
Copy link
Contributor Author

keewis commented Sep 30, 2024

looks like that finally did it. So with that we only need to decide what to do about the code duplication (or if we can, as I would suggest, leave it as is), and this should be good to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant