From 75fc095d499f13a094b2c891603029b8fc503b95 Mon Sep 17 00:00:00 2001 From: "Felix C. A. Auer" <10127354+FelixCAAuer@users.noreply.github.com> Date: Tue, 6 Oct 2026 13:37:03 +0200 Subject: [PATCH] Fix calculation of n_ks_per_rp --- CaseStudy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CaseStudy.py b/CaseStudy.py index c13b6e8..8aeff8a 100644 --- a/CaseStudy.py +++ b/CaseStudy.py @@ -1209,7 +1209,7 @@ def _resample_hindex_from_target_probs(self, target_probs: dict[str, np.ndarray] for scenario in hindex_flat['scenario'].unique().tolist(): sc = hindex_flat[hindex_flat['scenario'] == scenario].copy() sc = sc.sort_values(['p']) - n_ks_per_rp = len(self.dPower_WeightsK['scenario'] == scenario) + n_ks_per_rp = int((self.dPower_WeightsK['scenario'] == scenario).sum()) period_labels = sc['p'].tolist() first_rp = sc['rp'].iloc[0]