Closed gordonwatts closed 3 years ago
I think this may be a bug in awkward. I'm going to make an issue there and see what Jim says.
Two workarounds that I know of:
dict
; i.e., turn {'JetPT': e['lep_pt']}
into just e['lep_pt']
dict
: Zip({'JetPT': e['lep_pt']})
I think this may be a bug in awkward. I'm going to make an issue there and see what Jim says.
I take this back; I understand what the issue is now. This example that you have is a weird edge case because it doesn't generalize to dict
s beyond a size of 1. That is, .SelectMany(lambda e: {'a': e.a, 'b': e.b})
couldn't work in general because a
and b
could have different shapes, and ak.Array
can't handle fields with different outer (axis=0
) lengths. The only way to support that case would be to allow the output to be something other than an ak.Array
in certain cases, which would be a mess for anything downstream like ServiceX.
But it is possible to support single-item dict
s in SelectMany
, so I've added this in #45.
I've been seeing this with the production version of uproot in ServiceX:
And then I get back: