You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Zip predicate can be used in various places in an uproot call:
deftest_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)
assertexpr_type==Any
Here 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.
The text was updated successfully, but these errors were encountered:
The
Zip
predicate can be used in various places in anuproot
call:Here it is taking a dictionary of two
List[float]
's and turning it into aList[Dict[str, float]]
- or, rather, internally, as the tempdataclass
that a dict becomes.The code for
Zip
to type follow should be added. It would have to be added in theprocess_method_call
code, and probably some reasonably major surgery would be needed here.The text was updated successfully, but these errors were encountered: