Skip to content
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: ak.cartesian, ak.argcartesian #1317

Merged
merged 3 commits into from
Feb 24, 2022

Conversation

ioanaif
Copy link
Collaborator

@ioanaif ioanaif commented Feb 24, 2022

No description provided.

@codecov
Copy link

codecov bot commented Feb 24, 2022

Codecov Report

Merging #1317 (4e143f7) into main (5613d44) will decrease coverage by 1.81%.
The diff coverage is 47.08%.

❗ Current head 4e143f7 differs from pull request most recent head 9682cf0. Consider uploading reports for the commit 9682cf0 to get more accurate results

Impacted Files Coverage Δ
src/awkward/_v2/_connect/cling.py 0.00% <0.00%> (ø)
src/awkward/_v2/contents/listoffsetarray.py 80.55% <ø> (+0.13%) ⬆️
src/awkward/_v2/operations/structure/ak_unzip.py 75.00% <ø> (ø)
...wkward/_v2/operations/structure/ak_argcartesian.py 70.58% <64.28%> (-4.42%) ⬇️
...ard/_v2/operations/structure/ak_argcombinations.py 76.92% <70.00%> (+1.92%) ⬆️
...wkward/_v2/operations/structure/ak_combinations.py 90.90% <87.50%> (+15.90%) ⬆️
...c/awkward/_v2/operations/structure/ak_cartesian.py 89.34% <89.07%> (+14.34%) ⬆️
src/awkward/_v2/_lookup.py 97.50% <97.50%> (ø)
src/awkward/_v2/__init__.py 100.00% <100.00%> (ø)
src/awkward/_v2/_connect/numba/arrayview.py 96.76% <100.00%> (+0.51%) ⬆️
... and 15 more

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

Everything here looks great, including the very complicated cartesian function.

I noticed that argcartesian is excluding negative axis; I don't see a reason for that, so I'm removing that restriction and adding a test. Once that passes, I'll merge this.

Thanks!

Comment on lines 74 to 75
if axis < 0:
raise ValueError("the 'axis' of argcartesian must be non-negative")
Copy link
Member

Choose a reason for hiding this comment

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

I see no reason why the axis can't be negative. It's like that in v1, also:

https://github.com/scikit-hep/awkward-1.0/blob/5e4e4b984a62baf4075ab96113903f49de058ada/src/awkward/operations/structure.py#L3598-L3602

I'm guessing it's an artifact from a very early time. Anyway, I just committed this fix and added a test, so this PR will relax that constraint.

@jpivarski jpivarski enabled auto-merge (squash) February 24, 2022 18:22
@jpivarski jpivarski merged commit 6d3c1d2 into main Feb 24, 2022
@jpivarski jpivarski deleted the ioanaif/ak.arg_cartesian branch February 24, 2022 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants