File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Functions performing various calculations."""
22
33import numbers
4+ import operator
45from functools import reduce
56
67import numpy as np
@@ -364,7 +365,7 @@ def calculate_llh_for_table(
364365 (simulation_df [col ] == row [col ]) | petab .is_empty (row [col ])
365366 for col in compared_cols
366367 ]
367- mask = reduce (lambda x , y : x & y , masks )
368+ mask = reduce (operator . and_ , masks )
368369
369370 simulation = simulation_df .loc [mask ][SIMULATION ].iloc [0 ]
370371
Original file line number Diff line number Diff line change 11"""Functions performing various calculations."""
22
33import numbers
4+ import operator
45from functools import reduce
56
67import numpy as np
@@ -121,7 +122,7 @@ def calculate_residuals_for_table(
121122 (simulation_df [col ] == row [col ]) | is_empty (row [col ])
122123 for col in compared_cols
123124 ]
124- mask = reduce (lambda x , y : x & y , masks )
125+ mask = reduce (operator . and_ , masks )
125126 if mask .sum () == 0 :
126127 raise ValueError (
127128 f"Could not find simulation for measurement { row } ."
You can’t perform that action at this time.
0 commit comments