Skip to content

Commit e4d64a1

Browse files
committed
Deprecate unused numba functionality
1 parent 8b9c772 commit e4d64a1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pytensor/link/numba/dispatch/basic.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ def create_numba_signature(
125125
reduce_to_scalar: bool = False,
126126
) -> numba.types.Type:
127127
"""Create a Numba type for the signature of an `Apply` node or `FunctionGraph`."""
128+
warnings.warn(
129+
"create_numba_signature is deprecated and will be removed in a future release",
130+
FutureWarning,
131+
)
128132
input_types = [
129133
get_numba_type(
130134
inp.type, force_scalar=force_scalar, reduce_to_scalar=reduce_to_scalar
@@ -152,6 +156,11 @@ def create_tuple_creator(f, n):
152156
153157
See https://github.com/numba/numba/issues/2771#issuecomment-414358902
154158
"""
159+
warnings.warn(
160+
"create_tuple_creator is deprecated and will be removed in a future release",
161+
FutureWarning,
162+
)
163+
155164
assert n > 0
156165

157166
f = numba_njit(f)

tests/link/numba/test_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ def test_get_numba_type(v, expected, force_scalar, not_implemented):
314314
],
315315
)
316316
def test_create_numba_signature(v, expected, force_scalar):
317-
res = numba_basic.create_numba_signature(v, force_scalar=force_scalar)
317+
with pytest.warns(FutureWarning, match="deprecated"):
318+
res = numba_basic.create_numba_signature(v, force_scalar=force_scalar)
318319
assert res == expected
319320

320321

0 commit comments

Comments
 (0)