-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The Zip predicate can be used in various places in an uproot call:
def test_dictionary_Zip_key():
"Check that type follow from a dictionary through a Zip works"
s = ast_lambda(
"""({
'jet_pt': e.Jets().Select(lambda j: j.pt()),
'jet_eta': e.Jets().Select(lambda j: j.eta())}
.Zip()
.Select(lambda j: j.pt()))"""
)
objs = ObjectStream[Event](ast.Name(id="e", ctx=ast.Load()))
new_objs, new_s, expr_type = remap_by_types(objs, "e", Event, s)
assert expr_type == AnyHere it is taking a dictionary of two List[float]'s and turning it into a List[Dict[str, float]] - or, rather, internally, as the temp dataclass that a dict becomes.
The code for Zip to type follow should be added. It would have to be added in the process_method_call code, and probably some reasonably major surgery would be needed here.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request