-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ refactoring: Implementing combinations #1074
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked on Slack (code reviews are much better when interactive, but unfortunately, we don't get a public log). Some of the things I was worried about were unfounded (declaring the Index as np.intp
is exactly the right thing to do, and we do in fact need that ptr
property, at least for this exceptional double-pointer case). There were only a few remaining items in an overall excellent PR.
- centralize the
n < 1
check inContent.combinations
, so that it doesn't have to be in every_combinations
method - see if
ListArray._combinations
can reuseListOffsetArray._combinations
by calling it with itself (itsself
) as theself
argument, and if so, do so - add a
pytestmark
to skip the tests if Python 2
That's it! When you're done, let me know that you're not planning on committing any more changes and I'll merge it when the tests pass.
Thanks again; this is great!
I am done with all the changes, so you can merge this, after the tests pass. Thank You! |
This PR implements the
_combinations
function for all the Awkward Array types exceptVirtualArray
._combinations
implementation_combinations
tests