We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 422ac3c commit 863105aCopy full SHA for 863105a
pytensor/tensor/rewriting/subtensor.py
@@ -398,7 +398,7 @@ def local_replace_slice(fgraph, node):
398
x = node.inputs[0]
399
400
if not idxs:
401
- return [x]
+ return
402
403
new_idxs = list(idxs)
404
idx_flag = False
@@ -433,7 +433,12 @@ def local_replace_slice(fgraph, node):
433
raise AssertionError(
434
f"The type of the returned variable {x[tuple(new_idxs)].type} did not match with the type of the original variable {node.outputs[0].type}"
435
)
436
- return [x[tuple(new_idxs)]]
+
437
+ out = x[tuple(new_idxs)]
438
+ # Copy over previous output stacktrace
439
+ copy_stack_trace(node.outputs, out)
440
441
+ return [out]
442
443
444
# fast_compile to allow opt subtensor(cast{float32}(make_vector))
0 commit comments