Skip to content

ENH: Add array API standard v2022.12 support to numpy.array_api#23955

Merged
charris merged 15 commits intonumpy:maintenance/1.25.xfrom
charris:backport-23881
Jun 15, 2023
Merged

ENH: Add array API standard v2022.12 support to numpy.array_api#23955
charris merged 15 commits intonumpy:maintenance/1.25.xfrom
charris:backport-23881

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Jun 15, 2023

Backport of #23881.

Fixes #23880

asmeurer and others added 15 commits June 15, 2023 08:09
Updates from the v2022.12 version of the spec:

- Add __complex__.
- __float__, __int__, and __bool__ are now more lenient in what dtypes they
  can operate on.
- Support complex scalars and dtypes in all operators (except those that
  should not operate on complex numbers).
- Disallow integer scalars that are out of the bounds of the array dtype.
- Update the tests accordingly.
This is a new function in the v2022.12 version of the array API standard which
is used for determining if a given dtype is part of a set of given dtype
categories. This will also eventually be added to the main NumPy namespace,
but for now only exists in numpy.array_api as a purely strict version.
@asmeurer
Copy link
Copy Markdown
Member

Can you also backport #23789

@charris
Copy link
Copy Markdown
Member Author

charris commented Jun 15, 2023

Can you also backport #23789

It is already backported, I'm just waiting for cirrus arm64 runs to get back to working before merging.

@charris charris merged commit 42ef942 into numpy:maintenance/1.25.x Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants