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

Compatibility with the Array API standard #7848

Open
TomNicholas opened this issue May 18, 2023 · 4 comments
Open

Compatibility with the Array API standard #7848

TomNicholas opened this issue May 18, 2023 · 4 comments
Labels
API design array API standard Support for the Python array API standard topic-arrays related to flexible array support topic-chunked-arrays Managing different chunked backends, e.g. dask upstream issue

Comments

@TomNicholas
Copy link
Contributor

TomNicholas commented May 18, 2023

What is your issue?

Meta-issue to track all the smaller issues around making xarray and the array API standard compatible with each other.

We've already had

and there will likely be many others.


I suspect this might require changes to the standard as well as to xarray - in particular see this list of common numpy functions which are not currently in the array API standard. Of these xarray currently uses (FYI @ralfgommers ):

  • np.clip
  • np.diff
  • np.pad
  • np.repeat
  • np.take
  • np.tile
@TomNicholas TomNicholas added API design upstream issue topic-arrays related to flexible array support topic-chunked-arrays Managing different chunked backends, e.g. dask labels May 18, 2023
@TomNicholas
Copy link
Contributor Author

TomNicholas commented May 18, 2023

np.pad is an interesting example in the context of chunked arrays (xref #6807) - dask implements it (parallelized using various approaches, including map_blocks internally), but cubed currently doesn't implement it because it's not part of the array API standard. (cc @tomwhite)

@shoyer
Copy link
Member

shoyer commented Aug 14, 2023

Probably the most important missing feature for Xarray in the Array API standard is support for indexing with integer arrays: data-apis/array-api#669

@kgryte
Copy link

kgryte commented Oct 19, 2023

Quick update from the Array API standard, both take and tile have been merged in the standard. take is available as of the 2022.12 revision and tile will be included in the 2023 revision.

@TomNicholas
Copy link
Contributor Author

Thanks @kgryte! We also just bumped our minimum-supported numpy to 1.22 (#8346), which means we could potentially start using numpy.array_api internally for various operations...

@TomNicholas TomNicholas added the array API standard Support for the Python array API standard label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API design array API standard Support for the Python array API standard topic-arrays related to flexible array support topic-chunked-arrays Managing different chunked backends, e.g. dask upstream issue
Projects
Development

No branches or pull requests

3 participants