fix slice

This commit is contained in:
Valentin Boettcher 2022-08-14 15:53:15 +02:00
parent af1ca7465e
commit 0c6ccdf154
No known key found for this signature in database
GPG key ID: E034E12B7AF56ACE

View file

@ -116,9 +116,7 @@ class EnsembleValue:
def __getitem__(self, index):
return EnsembleValue(self._value[index])
def slice(self, *args):
slc = slice(*args)
def slice(self, slc: Union[np.ndarray, slice]):
results = []
for N, val, σ in self.aggregate_iterator:
results.append((N, val[slc], σ[slc]))