Repository navigation
ENH: chain additional exception on ufunc method lookup error - #12700
Conversation
|
@eric-wieser's suggestion to split the lookup and call may slightly speed up the call, since it skips some CPython code connected with arg parsing for the function, which in our case is unecessary. |
seberg
left a comment
There was a problem hiding this comment.
Looks good to me. I think NoneType instead of None is slightly more correct, but doesn't really matter. Maybe the comment could be /* although undocumented, accept NULL for Py_None */?
I saw pytest.raises accepts a message=regular_expression, but just a note for the future.
Planning to merge (maybe with those comment/doc changes) in a while.
|
Thanks @mattip for addressing this so quickly. I imagine if we look a little further we can close a few more issues with this. Searching for |
Fixes #7961. Adds an additional exception to the exception chain when calling the object method fails (only for object inner loops).