FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DEP: Finalize ``bool(empty_array)`` deprecation by seberg · Pull Request #27160 · numpy/numpy · GitHub

/ numpy Public

DEP: Finalize bool(empty_array) deprecation - #27160

Merged
ngoldbaum merged 2 commits into
numpy:mainfrom
seberg:dep-nonzero
Aug 15, 2024
Merged

DEP: Finalize bool(empty_array) deprecation#27160
ngoldbaum merged 2 commits into
numpy:mainfrom
seberg:dep-nonzero

Conversation

seberg commented Aug 9, 2024

Copy link
Copy Markdown
Member

This deprecation has been around for many years, let's finalize it. This means that e.g. bool(np.array([])) fails.

Some discussion also in gh-9885 (but it also discusses single element non 0-D arrays).

Closes gh-6722


I'll assume downstream that tests against nightlies avoids deprecation warnings, so that 2.1rc timing shouldn't lead to confusion.

This deprecation has been around for many years, let's finalize it.
This means that e.g. ``bool(np.array([]))`` fails.

Copy link
Copy Markdown
Member

The code changes look fine to me.

I'll assume downstream that tests against nightlies avoids deprecation warnings, so that 2.1rc timing shouldn't lead to confusion.

That assumption seems optimistic to me :)

This is a pretty easy warning to hit, so let's hold off on merging this for another few days at least to give any fallout from the RC time to show up on downstream CI.

seberg commented Aug 12, 2024

Copy link
Copy Markdown
Member Author

I dunno, for depcreations that are simple to fix (and years old), I think it likely holds, but I don't mind waiting either. :)

mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good to me! (Fine to wait a bit to avoid confusion.)

rgommers added this to the 2.2.0 release milestone Aug 14, 2024

Copy link
Copy Markdown
Member

OK, time to merge this. Thanks for the cleanup PRs Sebastian!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Testing Single-element NumPy Array Against Empty Python List

4 participants


Back | FazBrowse Home | New Git URL