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

DOC: Fix migration note for alltrue and sometrue #27015

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

mtsokol
Copy link
Member

@mtsokol mtsokol commented Jul 23, 2024

Hi @ngoldbaum,

I think I made a mistake in #26517 as pointed out it in astral-sh/ruff#12416.

np.sometrue and np.alltrue should be mapped to np.any and np.all instead of Python builtins any/all. (It could be also backported).

@mtsokol
Copy link
Member Author

mtsokol commented Jul 23, 2024

@rgommers I see that I took it from the deprecation message added here: 9990f98

I think in:

    .. deprecated:: 1.25.0
        ``sometrue`` is deprecated as of NumPy 1.25.0, and will be
        removed in NumPy 2.0. Please use `any` instead.

and

    .. deprecated:: 1.25.0
        ``alltrue`` is deprecated as of NumPy 1.25.0, and will be
        removed in NumPy 2.0. Please use `all` instead.

you meant np.all and np.any, not the Python builtins, right? As the release note states.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @mtsokol.

you meant np.all and np.any, not the Python builtins, right? As the release note states.

Yes indeed. That seemed clear to me even without the np. - I think all the surrounding notes with the np. included were written later. Nevertheless, this PR makes it more clear, so in it goes.

@rgommers rgommers changed the title BUG: Fix migration note for alltrue and sometrue DOC: Fix migration note for alltrue and sometrue Jul 23, 2024
@rgommers
Copy link
Member

Certainly not a bug I'd say - changed to DOC:

@rgommers rgommers merged commit d3d7b55 into numpy:main Jul 23, 2024
69 checks passed
@rgommers rgommers added the 09 - Backport-Candidate PRs tagged should be backported label Jul 23, 2024
@rgommers
Copy link
Member

Backporting sounds fine to me, in case we do a 2.0.2 release - label added.

@mtsokol mtsokol deleted the sometrue-migration branch July 23, 2024 09:34
@charris charris changed the title DOC: Fix migration note for alltrue and sometrue DOC: Fix migration note for alltrue and sometrue Jul 23, 2024
charris pushed a commit to charris/numpy that referenced this pull request Jul 24, 2024
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 24, 2024
ArvidJB pushed a commit to ArvidJB/numpy that referenced this pull request Nov 1, 2024
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.

3 participants