Skip to content

Commit

Permalink
Get rid of ak.zip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispap95 committed Feb 13, 2024
1 parent 58403db commit 30cd2e6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 27 deletions.
28 changes: 10 additions & 18 deletions tests/test_002-exclusive_jets.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,12 @@ def test_exclusive_jets_softdrop_grooming():
cluster = fastjet._pyjet.AwkwardClusterSequence(array, jetdef)
softdrop = cluster.exclusive_jets_softdrop_grooming()

softdrop_output = ak.zip(
softdrop_output = ak.from_iter(
{
"constituents": ak.Record(
{
"px": [32.2, 32.45],
"py": [64.21, 63.21],
"pz": [543.34, 543.14],
"E": [600.12, 599.56],
}
),
"constituents": [
{"px": 32.2, "py": 64.21, "pz": 543.34, "E": 600.12},
{"px": 32.45, "py": 63.21, "pz": 543.14, "E": 599.56},
],
"msoftdrop": 488.2395243115817,
"ptsoftdrop": 142.88274528437645,
"etasoftdrop": 2.726117171791057,
Expand Down Expand Up @@ -341,16 +337,12 @@ def test_exclusive_jets_softdrop_grooming_multi():
cluster = fastjet._pyjet.AwkwardClusterSequence(array, jetdef)
softdrop = cluster.exclusive_jets_softdrop_grooming()

softdrop_output = ak.zip(
softdrop_output = ak.from_iter(
{
"constituents": ak.Record(
{
"px": [32.2, 32.45],
"py": [64.21, 63.21],
"pz": [543.34, 543.14],
"E": [600.12, 599.56],
}
),
"constituents": [
{"px": 32.2, "py": 64.21, "pz": 543.34, "E": 600.12},
{"px": 32.45, "py": 63.21, "pz": 543.14, "E": 599.56},
],
"msoftdrop": ak.Array([488.2395243115817, 488.2395243115817]),
"ptsoftdrop": ak.Array([142.88274528437645, 142.88274528437645]),
"etasoftdrop": ak.Array([2.726117171791057, 2.726117171791057]),
Expand Down
14 changes: 5 additions & 9 deletions tests/test_008-dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,12 @@ def dask_multi_test_exclusive_jets_softdrop_grooming():
cluster = fastjet._pyjet.DaskAwkwardClusterSequence(darray, jetdef)
softdrop = cluster.exclusive_jets_softdrop_grooming().compute()

softdrop_output = ak.zip(
softdrop_output = ak.from_iter(
{
"constituents": ak.Record(
{
"px": [32.2, 32.45],
"py": [64.21, 63.21],
"pz": [543.34, 543.14],
"E": [600.12, 599.56],
}
),
"constituents": [
{"px": 32.2, "py": 64.21, "pz": 543.34, "E": 600.12},
{"px": 32.45, "py": 63.21, "pz": 543.14, "E": 599.56},
],
"msoftdrop": ak.Array([488.2395243115817, 488.2395243115817]),
"ptsoftdrop": ak.Array([142.88274528437645, 142.88274528437645]),
"etasoftdrop": ak.Array([2.726117171791057, 2.726117171791057]),
Expand Down

0 comments on commit 30cd2e6

Please sign in to comment.