Skip to content
Snippets Groups Projects
Commit ddabea0c authored by Johannes Schumann's avatar Johannes Schumann
Browse files

Fix output for empty datasets

parent e4ee79f2
No related branches found
No related tags found
No related merge requests found
Pipeline #26992 failed
......@@ -556,9 +556,12 @@ class GiBUUOutput:
else:
tmp = fobj["RootTuple"].arrays()
retval = np.concatenate((retval, tmp))
if len(retval) == 0:
retval = ak.Array(
np.recarray((0, ),
if retval is None or len(retval) == 0:
return ak.Array(
np.recarray((
0,
0,
),
dtype=list(
zip(GIBUU_FIELDNAMES,
len(GIBUU_FIELDNAMES) * [float]))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment