Skip to content

Commit ebf9016

Browse files
committed
Make non-strict zip strict in local_subtensor_of_alloc
1 parent e2e257c commit ebf9016

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/tensor/rewriting/subtensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ def local_subtensor_of_alloc(fgraph, node):
683683
# Slices to take from val
684684
val_slices = []
685685

686-
for i, (sl, dim) in enumerate(zip(slices, dims, strict=False)):
686+
for i, (sl, dim) in enumerate(zip(slices, dims[: len(slices)], strict=True)):
687687
# If val was not copied over that dim,
688688
# we need to take the appropriate subtensor on it.
689689
if i >= n_added_dims:

0 commit comments

Comments
 (0)