Skip to content

Commit 79d9662

Browse files
Allow zero shapes
1 parent 2e22d34 commit 79d9662

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
@@ -2066,9 +2066,7 @@ def unpack(
20662066
raise ValueError("Cannot unpack an empty list of shapes.")
20672067

20682068
n_splits = len(packed_shapes)
2069-
split_size = [
2070-
prod(shape, no_zeros_in_input=True).astype(int) for shape in packed_shapes
2071-
]
2069+
split_size = [prod(shape).astype(int) for shape in packed_shapes]
20722070
unpacked_tensors = split(flat_tensor, splits_size=split_size, n_splits=n_splits)
20732071

20742072
return tuple(

0 commit comments

Comments
 (0)