diff --git a/pes_to_spec/model.py b/pes_to_spec/model.py index f488c27aeba56eb823ede137cb01cb814777e070..98c64007513bb6ae90bc23df7bf39996a446db45 100644 --- a/pes_to_spec/model.py +++ b/pes_to_spec/model.py @@ -314,7 +314,7 @@ class SelectRelevantLowResolution(TransformerMixin, BaseEstimator): if channel in self.channels} # pad it with zeros, if we reach the edge of the array for channel in y.keys(): - y[channel] = [np.pad(y[channel][j], (0, 2*self.delta_tof - len(y[channel][j]))) + y[channel] = [np.pad(y[channel][j], (0, 2*self.delta_tof - y[channel][j].shape[1])) for j in range(len(y[channel]))] y[channel] = np.stack(y[channel], axis=1) if not keep_dictionary_structure: