@constructor
def shape_padright(t, n_ones=1):
 _t = as_tensor_variable(t)
 pattern = ([i for i in xrange(_t.type.ndim)] + (['x'] * n_ones))
 return DimShuffle(_t.broadcastable, pattern)(_t)

@ constructor def shape_padright ( t , n_ones = 1 ) : _t = as_tensor_variable ( t ) pattern = ( [ i for i in xrange ( _t . type . ndim ) ] + ( [ 'x' ] * n_ones ) ) return DimShuffle ( _t . broadcastable , pattern ) ( _t )
reshape t by right-padding the shape with n_ones 1s .