File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -414,7 +414,12 @@ def evaluate_expression(
414
414
# pygama.evt.modules.spms.my_func([...], arg1=val, arg2=val)
415
415
416
416
# get arguments list passed to the function (outermost parentheses)
417
- args_str = re .search (r"\((.*)\)$" , expr .strip ()).group (1 )
417
+ result = re .search (r"\((.*)\)$" , expr .strip (), re .DOTALL )
418
+ if result is None :
419
+ msg = f"could not parse the function arguments in '{ expr } '"
420
+ raise RuntimeError (msg )
421
+
422
+ args_str = result .group (1 )
418
423
419
424
# handle tier scoping: evt.<>
420
425
args_str = args_str .replace ("evt." , "" )
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def gather_pulse_data(
140
140
pulse_mask = pulse_mask .view_as ("ak" )
141
141
142
142
# apply the mask
143
- data = data [ak . values_astype ( pulse_mask , bool ) ]
143
+ data = data [pulse_mask ]
144
144
145
145
# remove empty arrays = table_names with no pulses
146
146
if drop_empty :
You can’t perform that action at this time.
0 commit comments