From 3975e4f41b85971d5542d4ce39288eefcac752e3 Mon Sep 17 00:00:00 2001 From: "Darian T. Yang" Date: Fri, 10 Nov 2023 12:04:33 -0500 Subject: [PATCH] fixed the --step-iter bug, works now --- wedap/h5_pdist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wedap/h5_pdist.py b/wedap/h5_pdist.py index 239d1a7..9f5f038 100644 --- a/wedap/h5_pdist.py +++ b/wedap/h5_pdist.py @@ -285,7 +285,9 @@ def _init_weights(self): #weights = [None] * (self.last_iter - weight_start + 1) weights = [] # fill out the weight list - for iter in range(weight_start, self.last_iter + 1, self.step_iter): + # can't use step-iter here since the entire weight array needs to be indexed by step-iter later + #for iter in range(weight_start, self.last_iter + 1, self.step_iter): + for iter in range(weight_start, self.last_iter + 1): #weights[iter - weight_start] = self.h5[f"iterations/iter_{iter:08d}/seg_index"]["weight"] weights.append(self.h5[f"iterations/iter_{iter:08d}/seg_index"]["weight"]) # 1D array of variably shaped arrays