Skip to content

Initial implementation of np.take_along_axis - #7202

Merged
sklam merged 34 commits into
numba:masterfrom
itamarst:np-take_along_axis
Sep 16, 2021
Merged

sklam merged 34 commits into
numba:masterfrom
itamarst:np-take_along_axis

Conversation

@itamarst

Copy link
Copy Markdown
Contributor

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).

@sklam

sklam commented Jul 21, 2021

Copy link
Copy Markdown
Member

@itamarst

Copy link
Copy Markdown
Contributor Author

@sklam fixed the flakes, thanks.

@gmarkall

Copy link
Copy Markdown
Member

Many thanks for the PR, I've now marked it for review.

@stuartarchibald

Copy link
Copy Markdown
Contributor

@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 stuartarchibald added 4 - Waiting on author Waiting for author to respond to review Effort - medium Medium size effort needed and removed 3 - Ready for Review labels Aug 10, 2021
@itamarst

Copy link
Copy Markdown
Contributor Author

@stuartarchibald ok tried to do that.

@itamarst

Copy link
Copy Markdown
Contributor Author

I'll go fix flake8 too.

@itamarst

Copy link
Copy Markdown
Contributor Author

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.

@itamarst

Copy link
Copy Markdown
Contributor Author

@stuartarchibald should be ready for another review, assuming everything passes.

@esc esc added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 4 - Waiting on author Waiting for author to respond to review labels Aug 31, 2021

@stuartarchibald stuartarchibald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Comment thread numba/np/arrayobj.py Outdated
Comment thread numba/np/arrayobj.py Outdated
Comment thread numba/np/numpy_support.py Outdated
@stuartarchibald stuartarchibald added 4 - Waiting on author Waiting for author to respond to review and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author labels Sep 10, 2021
itamarst and others added 2 commits September 13, 2021 15:56
Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>

@stuartarchibald stuartarchibald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itamarst thanks again for your efforts in implementing this somewhat difficult piece of NumPy functionality. Patch looks good!

@stuartarchibald stuartarchibald added 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on author Waiting for author to respond to review labels Sep 14, 2021
@sklam
sklam merged commit c8c2579 into numba:master Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to merge Review and testing done, is ready to merge Effort - medium Medium size effort needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants