Skip to content

Commit 707c82e

Browse files
committed
fixed circular import
1 parent 7b44445 commit 707c82e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytensor/graph/op.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
add_tag_trace,
2121
get_variable_trace_string,
2222
)
23-
from pytensor.tensor.utils import _gufunc_to_out_shape
2423

2524

2625
if TYPE_CHECKING:
@@ -599,6 +598,8 @@ def inplace_on_inputs(self, allowed_inplace_inputs: list[int]) -> "Op":
599598

600599
def infer_shape(self, fgraph, node, input_shapes):
601600
if hasattr(self, "gufunc_signature"):
601+
from pytensor.tensor.utils import _gufunc_to_out_shape
602+
602603
return _gufunc_to_out_shape(self.gufunc_signature, input_shapes)
603604
else:
604605
raise NotImplementedError(f"Op {self} does not implement infer_shape")

0 commit comments

Comments
 (0)