Repository navigation
Fix issue 8127 - #8247
Fix issue 8127#8247
Conversation
njriasan
left a comment
There was a problem hiding this comment.
This looks good to me. Thank you so much for the contribution.
stuartarchibald
left a comment
There was a problem hiding this comment.
Thanks for the patch @bszollosinagy. Thanks for reviewing @njriasan.
Not for this PR, but a general note, compile_isolated should not be used as it isn't isolated or particularly safe, it's better to just use @njit etc. Sometime in the future test_boundscheck.py needs a large scale refactor.
Adding the |
Fixes an issue with bounds checking when using advanced indexing, as described in Issue 8127
Added a unit test to reproduce the issue. The unit test looks to see if IndexError assertion is raised or not. It fails without the modification in numba\np\arrayobj.py, and passes if you use the version in this pull request.
Apparently the issue only manifests itself if you try to assign to the indexed array, and that is why it was not visible with the existing unit test "test_fancy_indexing_boundscheck"
Fixes #8127