Skip to content

Commit 789c0d1

Browse files
committed
Remove unused global_numba_func
1 parent f680568 commit 789c0d1

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
@@ -150,17 +150,8 @@ def njit_noop(*args, **kwargs):
150150
else:
151151
return lambda x: x
152152

153-
def py_global_numba_func(func):
154-
if hasattr(func, "py_func"):
155-
return func.py_func
156-
return func
157-
158153
mocks = [
159154
mock.patch("numba.njit", njit_noop),
160-
mock.patch(
161-
"pytensor.link.numba.dispatch.basic.global_numba_func",
162-
py_global_numba_func,
163-
),
164155
mock.patch(
165156
"pytensor.link.numba.dispatch.basic.tuple_setitem", py_tuple_setitem
166157
),

0 commit comments

Comments
 (0)