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

Revert "Implement NumPy's __array_function__ protocol for array methods that are not in the Array API Standard" #469

Merged
merged 1 commit into from
May 22, 2024

Conversation

tomwhite
Copy link
Member

Reverts #468

This is causing problems when running with xarray, so I'm reverting it for the time being.

@tomwhite tomwhite merged commit 8143af7 into main May 22, 2024
6 checks passed
@TomNicholas
Copy link
Member

Can you elaborate on what exactly goes wrong with this approach?

@tomwhite
Copy link
Member Author

Can you elaborate on what exactly goes wrong with this approach?

Yes, of course. With this change Xarray now thinks that it can use NdArrayLikeIndexingAdapter for indexing, rather than ArrayApiIndexingAdapter, see

https://github.com/pydata/xarray/blob/12123be8608f3a90c6a6d8a1cdc4845126492364/xarray/core/indexing.py#L874-L877

Switching the order here (i.e. check for__array_namespace__ before __array_function__) would work in this case, but I'm not sure if it has other implications. Otherwise I'm not sure how to fix this, since there doesn't seem to be much progress on standardising the NaN functions any time soon.

Any thoughts about how to proceed?

@TomNicholas
Copy link
Member

Thoughts in pydata/xarray#8834 (comment)

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.

2 participants