From dfa9d088c9e7dad8dfb0219f07b187c3bea8bd20 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Wed, 20 Mar 2024 13:16:48 -0300 Subject: [PATCH] check if masked-array --- ioos_qc/qartod.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ioos_qc/qartod.py b/ioos_qc/qartod.py index c256dfc..cb4114c 100644 --- a/ioos_qc/qartod.py +++ b/ioos_qc/qartod.py @@ -738,8 +738,9 @@ def attenuated_signal_test(inp : Sequence[N], def window_func(w): # When pandas>=1.0 and numba are installed, this is about twice as fast try: + import numba return w.apply(np.ptp, raw=True, engine='numba') - except (ImportError, TypeError): + except (ImportError, TypeError, numba.core.errors.NumbaTypeError): return w.apply(np.ptp, raw=True) check_func = np.ptp else: