From 5a0b99fa5d38a291ff12f5cf34db2556d4da22d0 Mon Sep 17 00:00:00 2001 From: Bert Palm <bert.palm@ufz.de> Date: Fri, 5 Mar 2021 15:03:50 +0100 Subject: [PATCH] [BUGFIX] untouched is not unflagged ! --- saqc/flagger/history.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/saqc/flagger/history.py b/saqc/flagger/history.py index 65759b25c..551dba6c4 100644 --- a/saqc/flagger/history.py +++ b/saqc/flagger/history.py @@ -160,7 +160,7 @@ class History: self.mask[pos] = pd.Series(True, index=s.index, dtype=bool) if force: - touched = np.isfinite(s) + touched = s.notna() self.mask.iloc[touched, :pos] = False self.hist[pos] = s @@ -287,7 +287,7 @@ class History: ---------- index : pd.Index the index to reindex to. - fill_value_last : float, default 0 + fill_value_last : float, default UNFLAGGED value to fill nan's (UNTOUCHED) in the last column. Defaults to 0 (UNFLAGGED). Returns -- GitLab