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

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

Merged
merged 15 commits into from
Jun 15, 2023

Conversation

charris
Copy link
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.
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
@asmeurer
Copy link
Member

Can you also backport #23789

@charris
Copy link
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
51 of 58 checks passed
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.

None yet

2 participants