8000 DEP: Finalize ``bool(empty_array)`` deprecation by seberg · Pull Request #27160 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DEP: Finalize bool(empty_array) deprecation #27160

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 2 commits into from
Aug 15, 2024
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
8000
Diff view
Diff view
Prev Previous commit
DOC: Add release note for bool(empty_array) expiration
  • Loading branch information
seberg committed Aug 9, 2024
commit 0525bb0fbcf51180b35135b66b022452e83a43d8
2 changes: 2 additions & 0 deletions doc/release/upcoming_changes/27160.expired.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* ``bool(np.array([]))`` and other empty arrays will now raise an error.
Use ``arr.size > 0`` instead to check whether an array has no elements.
0