Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follows on from #7067 and #6804, ensuring that we call
xp.astype()
on arrays rather thanarr.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 #xxxxTests addedwhats-new.rst
New functions/methods are listed inapi.rst