Skip to content

Commit 2ba2647

Browse files
aseyboldtricardoV94
authored andcommitted
enh: Improve static shape of Unbroadcast
1 parent 74efc96 commit 2ba2647

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/tensor/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def get_underlying_scalar_constant_value(
527527
grandparent.owner.op, Unbroadcast
528528
):
529529
ggp_shape = grandparent.owner.inputs[0].type.shape
530-
l = [s1 == 1 or s2 == 1 for s1, s2 in zip(ggp_shape, gp_shape)]
530+
l = [get_underlying_scalar_constant_value(s) for s in ggp_shape]
531531
gp_shape = tuple(l)
532532

533533
if not (idx < ndim):

0 commit comments

Comments
 (0)