aesara
aesara copied to clipboard
Prevent useless `DimShuffle`s produced by `TensorVariable.dimshuffle`
The DimShuffle
in the following should not be produced:
import aesara
import aesara.tensor as at
x = at.scalar("x")
z = x.dimshuffle()
aesara.dprint(z)
# InplaceDimShuffle{} [id A]
# |x [id B]