Skip to content

Commit

Permalink
Final edit to agg_stat
Browse files Browse the repository at this point in the history
  • Loading branch information
ishita9 committed Sep 26, 2024
1 parent b81da1a commit 80db4c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metcalcpy/agg_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ def _calc_stats(self, values):
# The single value case
try:
if num_parameters == 2:
stat_values = [stat_function(values, self.column_names, logger=logger)]
stat_values = [stat_function(values, self.column_names)]
else:
stat_values = [stat_function(values, self.column_names, True, logger=logger)]
stat_values = [stat_function(values, self.column_names, True)]

except Exception as e:
safe_log(logger, "error", f"Failed to calculate statistics: {e}")
Expand All @@ -314,9 +314,9 @@ def _calc_stats(self, values):
try:
for row in values:
if num_parameters == 2:
stat_value = [stat_function(row, self.column_names, logger=logger)]
stat_value = [stat_function(row, self.column_names)]
else:
stat_value = [stat_function(row, self.column_names, True, logger=logger)]
stat_value = [stat_function(row, self.column_names, True)]
stat_values.append(stat_value)
safe_log(logger, "info", "Statistics calculated successfully for all bootstrap samples.")
except Exception as e:
Expand Down

0 comments on commit 80db4c2

Please sign in to comment.