def transpose_inplace(x, **kwargs):
 dims = list(range((x.ndim - 1), (-1), (-1)))
 return elemwise.DimShuffle(x.broadcastable, dims, inplace=True)(x)

def transpose_inplace ( x , ** kwargs ) : dims = list ( range ( ( x . ndim - 1 ) , ( - 1 ) , ( - 1 ) ) ) return elemwise . DimShuffle ( x . broadcastable , dims , inplace = True ) ( x )
perform a transpose on a tensor without copying the underlying storage .