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 lenient dtype support #550

Merged
merged 2 commits into from
Aug 13, 2024
Merged

More lenient dtype support #550

merged 2 commits into from
Aug 13, 2024

Conversation

tomwhite
Copy link
Member

Some array API implementations are more lenient in the dtypes they allow for certain operations - e.g. sum can be used on arrays of bool (with return type int64). The array API doesn't rule out this behaviour - it's just not a part of the spec.

This is needed to improve Xarray integration, see cubed-dev/cubed-xarray#8

@tomwhite tomwhite added array api xarray-integration Uses or required for cubed-xarray integration labels Aug 12, 2024
@tomwhite tomwhite merged commit 0e6e3f0 into main Aug 13, 2024
10 of 11 checks passed
@tomwhite tomwhite deleted the more-lenient-dtype-support branch August 13, 2024 10:07
thodson-usgs pushed a commit to thodson-usgs/cubed that referenced this pull request Oct 24, 2024
* Allow `bool` in `sum` and `prod`

* Make dtype checking more lenient in case of 'all'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
array api xarray-integration Uses or required for cubed-xarray integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant