Skip to content

Conversation

charris
Copy link
Member

@charris charris 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.

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 numpygh-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 00 - Bug component: numpy.ma masked arrays 08 - Backport Used to tag backport PRs labels Feb 9, 2018
@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
@charris charris deleted the backport-10479 branch September 19, 2018 14:36
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 component: numpy.ma masked arrays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants