Skip to content

Commit 0eb76e3

Browse files
committed
Don't lose static shape in AdvancedIncSubtensor
1 parent 61cc02a commit 0eb76e3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pytensor/tensor/subtensor.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3021,12 +3021,7 @@ def make_node(self, x, y, *inputs):
30213021
return Apply(
30223022
self,
30233023
(x, y, *new_inputs),
3024-
[
3025-
tensor(
3026-
dtype=x.type.dtype,
3027-
shape=tuple(1 if s == 1 else None for s in x.type.shape),
3028-
)
3029-
],
3024+
[x.type()],
30303025
)
30313026

30323027
def perform(self, node, inputs, out_):

0 commit comments

Comments
 (0)