Skip to content

Commit d5e161b

Browse files
Allow zero shapes
1 parent e1a1c7f commit d5e161b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pytensor/tensor/extra_ops.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,9 +2129,7 @@ def unpack(
21292129
raise ValueError("Cannot unpack an empty list of shapes.")
21302130

21312131
n_splits = len(packed_shapes)
2132-
split_size = [
2133-
prod(shape, no_zeros_in_input=True).astype(int) for shape in packed_shapes
2134-
]
2132+
split_size = [prod(shape).astype(int) for shape in packed_shapes]
21352133
unpacked_tensors = split(flat_tensor, splits_size=split_size, n_splits=n_splits)
21362134

21372135
return tuple(

0 commit comments

Comments
 (0)