Closed
Description
Please describe the purpose of filing this issue
Unless I am missing something subtle about how slices work, I think those could all be treated equally:
import pytensor
import pytensor.tensor as at
x = pt.vector("x")
y1 = x[:-1]
y2 = x[0:-1]
y3 = x[0:-1:1]
f = pytensor.function([x], [y1, y2, y3])
pytensor.dprint(f)
DeepCopyOp [id A] '' 1
|Subtensor{:int64:} [id B] '' 0
|x [id C]
|ScalarConstant{-1} [id D]
DeepCopyOp [id E] '' 3
|Subtensor{int64:int64:} [id F] '' 2
|x [id C]
|ScalarConstant{0} [id G]
|ScalarConstant{-1} [id D]
DeepCopyOp [id H] '' 5
|Subtensor{int64:int64:int64} [id I] '' 4
|x [id C]
|ScalarConstant{0} [id G]
|ScalarConstant{-1} [id D]
|ScalarConstant{1} [id J]