Skip to content

BUG: avoid warning on ufunc with where=True and no output#31053

Merged
charris merged 1 commit intonumpy:maintenance/2.4.xfrom
charris:backport-31045
Mar 23, 2026
Merged

BUG: avoid warning on ufunc with where=True and no output#31053
charris merged 1 commit intonumpy:maintenance/2.4.xfrom
charris:backport-31045

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Mar 23, 2026

Backport of #31045.

Alternative fix for gh-31030. This does not change that out=None is removed from what is passed to the ufunc, but ensures that if from the ufunc one calls the original function with the original keyword arguments, there will only be a warning about a missing out argument if where!=True. Hence, the net effect is that the warning introduced in gh-29813 will no longer fire if there is no risk of uninitialized output.

(No AI was used.)

Alternative fix for numpygh-31030. This does not change that `out=None` is
removed from what is passed to the ufunc, but ensures that if from the
ufunc one calls the original function with the original keyword
arguments, there will only be a warning about a missing `out` argument
if `where!=True`.
@charris charris added this to the 2.4.4 release milestone Mar 23, 2026
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Mar 23, 2026
@charris charris merged commit 701ce96 into numpy:maintenance/2.4.x Mar 23, 2026
74 checks passed
@charris charris deleted the backport-31045 branch March 23, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants