Skip to content

BUG: fix np.ma.masked_where(copy=False) when input has no mask #18967

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

Merged
merged 3 commits into from
May 10, 2021

Conversation

constanzafierro
Copy link
Contributor

@constanzafierro constanzafierro commented May 9, 2021

Fixes #18946

Fixes np.ma.masked_where(copy=False), which before this patch failed to modify array in place when there were no masked elements in the array initially.

@rgommers rgommers added the component: numpy.ma masked arrays label May 9, 2021
@rgommers rgommers added this to the 1.21.0 release milestone May 10, 2021
@rgommers rgommers changed the title BUG: fixes np.ma.masked_where(copy=False) fails to modify array in place when there were no masked elements in the array initially BUG: fix np.ma.masked_where(copy=False) when input has no mask May 10, 2021
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.

This is a nice fix, thanks @cfierro94!

CI is all green, and bug fix and tests LGTM, so in it goes.

@rgommers rgommers merged commit b6eb3d8 into numpy:main May 10, 2021
@rgommers
Copy link
Member

Some very minor things for next time:

  • It's better not to merge main into the branch you are making the PR from (it makes the history more tangled), unless that's necessary to resolve a merge conflict.
  • I edited the title to be a bit shorter (easier to read in the list of open PRs), and moved the rest into the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants