From dca3490043c60a9706715fac12a6d7e71fbadf95 Mon Sep 17 00:00:00 2001 From: David Schaefer <david.schaefer@ufz.de> Date: Tue, 31 Aug 2021 11:42:36 +0200 Subject: [PATCH] [FIX] flagConstants: don't flag NaNs as constant --- saqc/funcs/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/saqc/funcs/constants.py b/saqc/funcs/constants.py index 1abb3f73f..df167b79c 100644 --- a/saqc/funcs/constants.py +++ b/saqc/funcs/constants.py @@ -75,7 +75,7 @@ def flagConstants( starting_points_mask = rolling.max() - rolling.min() <= thresh rolling = customRoller(starting_points_mask, **kws, forward=True) # mimic any() - mask = rolling.sum() > 0 + mask = (rolling.sum() > 0) & d.notna() flags[mask, field] = flag return data, flags -- GitLab