We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7365079 commit c605857Copy full SHA for c605857
pandas/core/apply.py
@@ -13,6 +13,7 @@
13
cast,
14
)
15
16
+import numba
17
import numpy as np
18
19
from pandas._libs.internals import BlockValuesRefs
@@ -1148,8 +1149,9 @@ def wrapper(*args, **kwargs):
1148
1149
return wrapper
1150
1151
if engine == "numba":
- engine_obj = NumbaExecutionEngine()
1152
- result = engine_obj.apply(
+ if not hasattr(numba.jit, "__pandas_udf__"):
1153
+ numba.jit.__pandas_udf__ = NumbaExecutionEngine
1154
+ result = numba.jit.__pandas_udf__.apply(
1155
self.values,
1156
self.func,
1157
self.args,
0 commit comments