diff --git a/pyerrors/correlators.py b/pyerrors/correlators.py index 6759a49c..7f318976 100644 --- a/pyerrors/correlators.py +++ b/pyerrors/correlators.py @@ -74,7 +74,7 @@ class Corr: @property def reweighted(self): - bool_array = np.array([list(map(lambda x: x.reweighted, o)) for o in list(filter(None.__ne__, self.content))]) + bool_array = np.array([list(map(lambda x: x.reweighted, o)) for o in [x for x in self.content if x is not None]]) if np.all(bool_array == 1): return True elif np.all(bool_array == 0):