BUG: numpy.einsum indexing arrays now accept numpy int type#16080
BUG: numpy.einsum indexing arrays now accept numpy int type#16080seberg merged 8 commits intonumpy:masterfrom
Conversation
Added tests to check that einsum accepts numpy int64 types and rejects bool. Rejecting bools is new behaviour in subscript lists. I changed ValueError to TypeError on line 2496 in multiarraymodule.c as it is more appropriate. I also modified einsumfunc.py to have the same behaviour as in the C file when checking subscript list. (Reject bools but accept anything else from operator.index())
|
Please let me know what you think of this new commit! I had to change |
anirudh2290
left a comment
There was a problem hiding this comment.
Thanks for working on this, overall looks good !
|
Could you add a release note for this under |
seberg
left a comment
There was a problem hiding this comment.
Just some nits, I may just commit those suggestions and merge in a day or so. If you have some time, happy if you finish it off though (and please see if moving the error creation looks better)!
|
Thanks Ryan, lets put it in before I wonder if it was nicer before ;). |
Fixes #15961.
All current tests pass. I didn't write any new tests for this though, but perhaps I should do that?