aesara.tensor.shape_padaxis

Contents

aesara.tensor.shape_padaxis#

aesara.tensor.shape_padaxis(t, axis)[source]#

Reshape t by inserting 1 at the dimension axis.

Examples

>>> tensor = aesara.tensor.type.tensor3()
>>> aesara.tensor.shape_padaxis(tensor, axis=0)
DimShuffle{x,0,1,2}.0
>>> aesara.tensor.shape_padaxis(tensor, axis=1)
DimShuffle{0,x,1,2}.0
>>> aesara.tensor.shape_padaxis(tensor, axis=3)
DimShuffle{0,1,2,x}.0
>>> aesara.tensor.shape_padaxis(tensor, axis=-1)
DimShuffle{0,1,2,x}.0

See also

shape_padleft, shape_padright, Dimshuffle