From 0d89a64f224a06a0c6df839fb861dcdd82c45633 Mon Sep 17 00:00:00 2001 From: Lindsey Gray Date: Wed, 17 Jan 2024 14:21:06 -0600 Subject: [PATCH] less around the elbow... --- src/fastjet/_generalevent.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/fastjet/_generalevent.py b/src/fastjet/_generalevent.py index 0bff10de..e7f19426 100644 --- a/src/fastjet/_generalevent.py +++ b/src/fastjet/_generalevent.py @@ -211,11 +211,10 @@ def _check_subtree_input(self, data): return False def extract_cons(self, array): - packed_flattened = ak.flatten(array) - px = packed_flattened.px.to_numpy() - py = packed_flattened.py.to_numpy() - pz = packed_flattened.pz.to_numpy() - E = packed_flattened.E.to_numpy() + px = ak.to_numpy(array.px.layout.content) + py = ak.to_numpy(array.py.layout.content) + pz = ak.to_numpy(array.pz.layout.content) + E = ak.to_numpy(array.E.layout.content) off = np.asarray(array.layout.stops) off = np.insert(off, 0, 0) return px, py, pz, E, off