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

Array API fixes for astype #7847

Merged
merged 3 commits into from
May 19, 2023
Merged

Conversation

TomNicholas
Copy link
Member

@TomNicholas TomNicholas commented May 18, 2023

Follows on from #7067 and #6804, ensuring that we call xp.astype() on arrays rather than arr.astype(), as the latter is commonly-implemented by array libraries but not part of the array API standard.

A bit of a pain to test in isolation because I made the changes so that xarray's .pad would work with array-API-conforming libraries, but actually np.pad is not part of the array API either, so it's going to coerce to numpy for that reason anyway.

(This PR replaces #7815, as making a new branch was easier than merging/rebasing with all the changes in #7019.)

  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

@TomNicholas TomNicholas enabled auto-merge (squash) May 19, 2023 14:50
@TomNicholas TomNicholas merged commit 05c7888 into pydata:main May 19, 2023
dstansby pushed a commit to dstansby/xarray that referenced this pull request Jun 28, 2023
* array API fixes for astype

* whatsnew
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