I'm running into some trouble when using awkward array 1.0 to make combinations of particles with ak.combinations
. I see the error when trying to do ak.unzip
on the combinations I have made (following the tutorial here: https://mybinder.org/v2/gh/jpivarski/2020-07-13-pyhep2020-tutorial.git/1.1?urlpath=lab/tree/tutorial.ipynb).
I have put an example which reproduces the error here:
https://github.com/donalrinho/awkward1_combinatorics_test
and would be very grateful for any help to understand what I'm doing wrong. The error I see is:
Traceback (most recent call last):
File "python/simple_combiner.py", line 41, in <module>
pi1, pi2 = ak.unzip(pi_pairs)
ValueError: too many values to unpack (expected 2)
The error doesn't occur when I restrict the input data to a specific variable, so for instance:
pi_pairs = ak.combinations(pi["pt"], 2)
pi1, pi2 = ak.unzip(pi_pairs)
where I pass in only the pt
of the pi
array.