-
-
Notifications
You must be signed in to change notification settings - Fork 11k
BUG: numpy.putmask respecting writeable flag #17873
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
Conversation
The other path must leak, since dtype registration is permanent (at least I think so).
The readonly flag was not being set and untested. Also the request for a readonly buffer incorrectly did not set an error.
BUG: Fix buffer readflag errors and small leaks
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 5.41.3 to 5.41.4. - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](HypothesisWorks/hypothesis@hypothesis-python-5.41.3...hypothesis-python-5.41.4) Signed-off-by: dependabot-preview[bot] <[email protected]>
`openblas64_-v0.3.10-win_amd64-gcc_7_1_0.zip` is already given in line 57
MAINT: Remove duplicate dictionary entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good, just some nitpicks.
numpy/core/tests/test_multiarray.py
Outdated
a = np.arange(12) | ||
a.setflags(write = False) | ||
|
||
with pytest.raises(Exception) as e_info: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nicer if you make this specific, i.e. not Exception
but what ever it is (probably a TypeError
). You also do not use e_info
, so just remove it. If you want to be precise, you can add match="putmask: output array"
which will check the error message as well.
It seems that I messed up the commit history here. I think it may have been because I:
Don't know how to fix it, so I've opened up a new PR in a new branch with the exact same thing as this one: #17884. |
This is fixing issue #17871.