Skip to content

Commit a4a2ac0

Browse files
committed
Remove unused global_numba_func
1 parent 0e9f37c commit a4a2ac0

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

pytensor/link/numba/dispatch/basic.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@
4242
from pytensor.tensor.type_other import MakeSlice, NoneConst
4343

4444

45-
def global_numba_func(func):
46-
"""Use to return global numba functions in numba_funcify_*.
47-
48-
This allows tests to remove the compilation using mock.
49-
"""
50-
return func
51-
52-
5345
def numba_njit(*args, fastmath=None, **kwargs):
5446
kwargs.setdefault("cache", config.numba__cache)
5547
kwargs.setdefault("no_cpython_wrapper", True)

tests/link/numba/test_basic.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,8 @@ def inner_vec(*args):
175175
else:
176176
return wrap
177177

178-
def py_global_numba_func(func):
179-
if hasattr(func, "py_func"):
180-
return func.py_func
181-
return func
182-
183178
mocks = [
184179
mock.patch("numba.njit", njit_noop),
185-
mock.patch(
186-
"pytensor.link.numba.dispatch.basic.global_numba_func",
187-
py_global_numba_func,
188-
),
189180
mock.patch(
190181
"pytensor.link.numba.dispatch.basic.tuple_setitem", py_tuple_setitem
191182
),

0 commit comments

Comments
 (0)