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 broken out argument in np.ma ufunc_likes #9690

Closed
wants to merge 1 commit into from

Conversation

eric-wieser
Copy link
Member

Fixes #9687

Things to be careful of:

  • out.data overlapping a.data
  • out.mask overlapping a.mask
  • ignored: overlaps between data and masks - this doesn't seem like a good idea anyway

The following decisions were made here:

  • getmask(out) is nomask -> allocate a new mask buffer, reuse the data buffer
  • Otherwise, reuse both buffers, but return a new view (np.ma already has view identity problems anyway)

No tests yet - would welcome anyone else contributing those

@eric-wieser
Copy link
Member Author

eric-wieser commented Sep 15, 2017

This fails on np.ma.angle, because that pretends to be a ufunc yet has no out argument

@eric-wieser eric-wieser reopened this Oct 23, 2019
Base automatically changed from master to main March 4, 2021 02:04
@charris charris added the 52 - Inactive Pending author response label Apr 6, 2022
@charris charris closed this Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inplace masked functions returning different results in 1.13.1
2 participants