From acfdb8c28243487bdc7438ef7e58f209a5609a49 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Mon, 6 Jan 2025 12:23:37 -0700 Subject: [PATCH] fix append to append stat_value, not a list of stat_value --- metcalcpy/agg_stat_bootstrap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metcalcpy/agg_stat_bootstrap.py b/metcalcpy/agg_stat_bootstrap.py index 17188fda..0687b456 100644 --- a/metcalcpy/agg_stat_bootstrap.py +++ b/metcalcpy/agg_stat_bootstrap.py @@ -308,7 +308,7 @@ def _calc_stats(self, cases): try: stat_values = [] stat_value = globals()[func_name](values, self.column_names, logger=logger) - stat_values.append([stat_value]) + stat_values.append(stat_value) safe_log(logger, "info", f"Statistic calculated for bootstrap iteration: {stat_value}") except Exception as e: safe_log(logger, "error", f"Error calculating statistic for bootstrap iteration: {e}") @@ -324,7 +324,7 @@ def _calc_stats(self, cases): # Calculate the statistic for each bootstrap iteration try: stat_value = globals()[func_name](values, self.column_names, logger=logger) - stat_values.append([stat_value]) + stat_values.append(stat_value) safe_log(logger, "info", f"Statistic calculated for bootstrap iteration: {stat_value}") except Exception as e: safe_log(logger, "error", f"Error calculating statistic for bootstrap iteration: {e}")