From 8a870386bfce3361ad6c1135905e77e53ef672ac Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 2 Apr 2024 15:38:24 +0200 Subject: [PATCH] run pre-commit --- ioos_qc/qartod.py | 4 ++-- tests/test_qartod.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ioos_qc/qartod.py b/ioos_qc/qartod.py index 04f8b58..5242bc2 100644 --- a/ioos_qc/qartod.py +++ b/ioos_qc/qartod.py @@ -385,12 +385,12 @@ def check(self, tinp, inp, zinp): fail_idx = np.zeros(inp.size, dtype=bool) suspect_idx = (inp < m.vspan.minv) | (inp > m.vspan.maxv) - + with np.errstate(invalid='ignore'): flag_arr[(values_idx & fail_idx)] = QartodFlags.FAIL flag_arr[(values_idx & ~fail_idx & suspect_idx)] = QartodFlags.SUSPECT flag_arr[(values_idx & ~fail_idx & ~suspect_idx)] = QartodFlags.GOOD - + # If the value is masked set the flag to MISSING flag_arr[inp.mask] = QartodFlags.MISSING diff --git a/tests/test_qartod.py b/tests/test_qartod.py index 92b5a74..d3f25b9 100644 --- a/tests/test_qartod.py +++ b/tests/test_qartod.py @@ -913,7 +913,7 @@ def test_climatology_test_depths(self): ] expected_result = [1, 1, 1, 3, 3, 3] self._run_test(test_inputs, expected_result) - + class QartodSpikeTest(unittest.TestCase):