MAINT: Improve error handling in umathmodule setup#17014
Merged
seberg merged 2 commits intonumpy:masterfrom Aug 6, 2020
Merged
MAINT: Improve error handling in umathmodule setup#17014seberg merged 2 commits intonumpy:masterfrom
seberg merged 2 commits intonumpy:masterfrom
Conversation
33a504e to
318a4e7
Compare
eric-wieser
commented
Aug 5, 2020
numpy/core/src/umath/umathmodule.c
Outdated
Comment on lines
-257
to
-258
Member
Author
There was a problem hiding this comment.
This list had gotten very stale - seemed better to avoid it altogether
Member
There was a problem hiding this comment.
True, the conditional style is not really used in NumPy, but I agree with using it here, everything else is just extremely verbose.
Really this only ensures MemoryErrors propagate, nothing else can go wrong here.
318a4e7 to
47bda4c
Compare
seberg
approved these changes
Aug 6, 2020
Member
seberg
left a comment
There was a problem hiding this comment.
Thanks Eric. LGTM modulo missing (unimportant) DECREF and test success.
numpy/core/src/umath/umathmodule.c
Outdated
Comment on lines
-257
to
-258
Member
There was a problem hiding this comment.
True, the conditional style is not really used in NumPy, but I agree with using it here, everything else is just extremely verbose.
Member
|
Thanks Eric, I took the liberty of just adding the DECREF. |
35 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Really this only ensures MemoryErrors propagate, nothing else can go wrong here.
Addresses item 3 from #17012. I don't think this is worth considering a bug, since running out of memory when creating a ufunc is not likely.