From 58d63cba90e922417cc3b48f4a76cc230ad97fe3 Mon Sep 17 00:00:00 2001 From: Eero Vaher Date: Wed, 13 May 2026 15:30:38 +0200 Subject: [PATCH] Speed up `check_errwarn()` This speeds up all the functions in `core.py` for which the corresponding ufunc returns a status code, i.e. the functions that can emit a warning or raise an error. --- erfa/core.py.templ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erfa/core.py.templ b/erfa/core.py.templ index a43969c..e4d2410 100644 --- a/erfa/core.py.templ +++ b/erfa/core.py.templ @@ -64,7 +64,7 @@ STATUS_CODES_REMAP = { def check_errwarn(statcodes, func_name): - if not np.any(statcodes): + if not statcodes.any(): return statcodes = np.atleast_1d(statcodes) # Remap any errors into warnings in the STATUS_CODES_REMAP dict.