Skip to content

Commit ab3704b

Browse files
committed
Remove unused numba dispatch function
1 parent 8cc489b commit ab3704b

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

pytensor/link/numba/dispatch/elemwise.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
from collections.abc import Callable
21
from functools import singledispatch
32
from textwrap import dedent, indent
4-
from typing import Any
53

64
import numba
75
import numpy as np
86
from numba.core.extending import overload
97
from numpy.core.numeric import normalize_axis_index, normalize_axis_tuple
108

119
from pytensor import config
12-
from pytensor.graph.basic import Apply
1310
from pytensor.graph.op import Op
1411
from pytensor.link.numba.dispatch import basic as numba_basic
1512
from pytensor.link.numba.dispatch.basic import (
@@ -124,42 +121,6 @@ def scalar_in_place_fn_ScalarMinimum(op, idx, res, arr):
124121
"""
125122

126123

127-
def create_vectorize_func(
128-
scalar_op_fn: Callable,
129-
node: Apply,
130-
use_signature: bool = False,
131-
identity: Any | None = None,
132-
**kwargs,
133-
) -> Callable:
134-
r"""Create a vectorized Numba function from a `Apply`\s Python function."""
135-
136-
if len(node.outputs) > 1:
137-
raise NotImplementedError(
138-
"Multi-output Elemwise Ops are not supported by the Numba backend"
139-
)
140-
141-
if use_signature:
142-
signature = [create_numba_signature(node, force_scalar=True)]
143-
else:
144-
signature = []
145-
146-
target = (
147-
getattr(node.tag, "numba__vectorize_target", None)
148-
or config.numba__vectorize_target
149-
)
150-
151-
numba_vectorized_fn = numba_basic.numba_vectorize(
152-
signature, identity=identity, target=target, fastmath=config.numba__fastmath
153-
)
154-
155-
py_scalar_func = getattr(scalar_op_fn, "py_func", scalar_op_fn)
156-
157-
elemwise_fn = numba_vectorized_fn(scalar_op_fn)
158-
elemwise_fn.py_scalar_func = py_scalar_func
159-
160-
return elemwise_fn
161-
162-
163124
def create_multiaxis_reducer(
164125
scalar_op,
165126
identity,

0 commit comments

Comments
 (0)