Skip to content

Commit 55090f7

Browse files
committed
deprecate tests using .value
1 parent eb19200 commit 55090f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytensor/tensor/extra_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ def broadcast_shape_iter(
15641564
(one,) * (max_dims - len(a))
15651565
+ tuple(
15661566
one
1567-
if sh == 1 or isinstance(sh, Constant) and sh.value == 1
1567+
if sh == 1 or isinstance(sh, Constant) and sh.data == 1
15681568
else (ps.as_scalar(sh) if not isinstance(sh, Variable) else sh)
15691569
for sh in a
15701570
)
@@ -1603,7 +1603,7 @@ def broadcast_shape_iter(
16031603
const_nb_shapes: set[Variable] = set()
16041604
for shape in non_bcast_shapes:
16051605
if isinstance(shape, Constant):
1606-
const_nb_shapes.add(shape.value.item())
1606+
const_nb_shapes.add(shape.data.item())
16071607
else:
16081608
nonconst_nb_shapes.add(shape)
16091609

0 commit comments

Comments
 (0)