Repository navigation
Initial implementation of np.take_along_axis - #7202
Conversation
|
@sklam fixed the flakes, thanks. |
|
Many thanks for the PR, I've now marked it for review. |
|
@itamarst Any chance you could resolve the merge conflicts please so as to make it possible to review this? Many thanks for your help. |
|
@stuartarchibald ok tried to do that. |
|
I'll go fix flake8 too. |
Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>
Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>
|
Going to take a break and see if NumPy maintainers have any suggestions, otherwise I will try to figure out how the two algorithms differ. |
…nce to convince Numba the tuple_setitem won't be called on empty tuples.
|
@stuartarchibald should be ready for another review, assuming everything passes. |
stuartarchibald
left a comment
There was a problem hiding this comment.
@itamarst many thanks for the update. I've taken a look at the new code (broadcasting part) and other patches since the first review. There's couple of minor things to resolve else looks good. Thanks again for working on this.
Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>
stuartarchibald
left a comment
There was a problem hiding this comment.
@itamarst thanks again for your efforts in implementing this somewhat difficult piece of NumPy functionality. Patch looks good!
This adds basic
np.take_along_axis()support, with some code initially sketched by @stuartarchibald.Unfortunately, I haven't figured out how to support non-literal axis values, which is an unfortunate limitation. Suggestions are welcome, but getting arbitrary-sized tuples seems hard to impossible, and the other implementation seems to require fancy indexing Numba doesn't do yet (though I could be wrong).