scikit-hep / awkward

Manipulate JSON-like data with NumPy-like idioms.
https://awkward-array.org
BSD 3-Clause "New" or "Revised" License
850 stars 89 forks source link

fix: ak.argcombinations should allow negative axis #3301

Closed jpivarski closed 1 week ago

pfackeldey commented 1 week ago

@jpivarski looks good to me! I wonder: do you know why this was forbidden in the first place?

jpivarski commented 1 week ago

I think it's just always been an oversight.

When I was adding axis arguments to everything in the Awkward 0 → 1 transition, I must have thought, "There's no way this is well-defined (or implementable) if it has an axis argument" for argchoose but then had a different thought in choose. I probably never looked at them side by side like this. It is not the case that they originally both had the restriction and it was lifted from choose. So, it's not a maintenance inconsistency; it's a development inconsistency.