Skip to content

Parametrize over different reduction operations #5

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

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

TomNicholas
Copy link
Member

No description provided.

@keewis keewis merged commit 491273d into xarray-contrib:main Aug 22, 2024
8 checks passed
@@ -12,22 +13,15 @@ class ReductionTests(DuckArrayTestMixin):
def expected_errors(op, **parameters):
return nullcontext()

@pytest.mark.parametrize("op", ["mean", "sum", "prod", "std", "var"])

Choose a reason for hiding this comment

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

One of "min" or "max" would be good for checking that dtype is preserved. I'm not sure "std" adds much over "var".

Copy link
Member Author

Choose a reason for hiding this comment

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

These were really just chosen in order to cover some known bugs with cubed. Specifically that cubed doesn't yet implement std or var, and the array API standard only requires mean to work with floats, not integers.

Eventually we would want a test suite that covers everything, this is just meant to be a proof-of-principle for discussing overall design.

@keewis keewis mentioned this pull request Aug 23, 2024
1 task
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.

3 participants