8000 ENH: Upgrade Array API version to 2024.12 by mtsokol · Pull Request #28615 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Upgrade Array API version to 2024.12 #28615

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

Merged
merged 5 commits into from
May 10, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a release note
  • Loading branch information
mtsokol committed May 10, 2025
commit cd000d5109e31bfa15c6dcb48cd8f3fcdbbca94c
2 changes: 2 additions & 0 deletions doc/release/upcoming_changes/28615.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* NumPy's ``__array_api_version__`` was upgraded from ``2023.12`` to ``2024.12``.
* `numpy.count_nonzero` for ``axis=None`` now returns a scalar instead of a Python integer.
Copy link
Member
@seberg seberg Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `numpy.count_nonzero` for ``axis=None`` now returns a scalar instead of a Python integer.
* `numpy.count_nonzero` for ``axis=None`` (default) now returns a NumPy scalar instead of a Python integer.

Anyway it's probably OK, but larger than it looks. So I would like someone else to sign off on this subtle change before merging it. Maybe @mhvk?
(I don't want to argue that the old thing is better, just the very subtle change that I can see being useful in practice, unfortunately.)

(I guess the typing diff shows similar places to skimage, where the result might be subtly slightly worse.)

EDIT: See also data-apis/array-api#932

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the release note tweak.

0