From 38fa28a1e842819eede4fdaced3f1e16e491ba2f Mon Sep 17 00:00:00 2001 From: Jianfeng Mao <4297243+jmao-denver@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:10:24 -0600 Subject: [PATCH] fix: Add a missing numba dependency check (#6015) Found this bug when testing Python 3.13.0rc1. --- py/server/deephaven/_udf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py/server/deephaven/_udf.py b/py/server/deephaven/_udf.py index dabe1cb2c0b..5163a51b577 100644 --- a/py/server/deephaven/_udf.py +++ b/py/server/deephaven/_udf.py @@ -202,7 +202,11 @@ def prepare_auto_arg_conv(self, encoded_arg_types: str) -> bool: parameters.""" # numba and numpy ufuncs don't need auto argument conversion as they handle the conversion themselves and the # arg types are already verified by the query engine - if isinstance(self.fn, (numba.np.ufunc.gufunc.GUFunc, numba.np.ufunc.dufunc.DUFunc)) or isinstance(self.fn, numpy.ufunc): + if numba: + if isinstance(self.fn, (numba.np.ufunc.gufunc.GUFunc, numba.np.ufunc.dufunc.DUFunc)): + return False + + if isinstance(self.fn, numpy.ufunc): return False if not self.params or not encoded_arg_types: