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

BUG: Fix calling ufuncs with a positional output argument. #10560

Merged
merged 1 commit into from Feb 9, 2018

Conversation

Projects
None yet
2 participants
@charris
Copy link
Member

commented Feb 9, 2018

Backport of #10479.

Currently, this causes the result to inherit the output's mask.

This brings np.add(a, b, out) in line with np.add(a, b, out=out).
These previously differed because gh-10459 causes them to call
array_wrap in different ways (with and without the output argument
in the context tuple, respectively).

Since the data in the out argument is never used by ufuncs, it seems
consistent that the mask should not be either.

BUG: Fix calling ufuncs with a positional output argument.
Currently, this causes the result to inherit the output's mask.

This brings `np.add(a, b, out)` in line with  `np.add(a, b, out=out)`.
These previously differed because gh-10459 causes them to call
__array_wrap__ in different ways (with and without the output argument
in the context tuple, respectively).

Since the data in the `out` argument is never used by ufuncs, it seems
consistent that the mask should not be either.

@charris charris added this to the 1.14.1 release milestone Feb 9, 2018

@charris charris merged commit 36c9ebf into numpy:maintenance/1.14.x Feb 9, 2018

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: Python No alert changes
Details

@charris charris deleted the charris:backport-10479 branch Sep 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.