'Function to perform a fast copy transpose/dimshuffle operation.
Works just like numpy.transpose, but requires an output tensor argument.'

def copy_transpose(self, a, out, axes=None, repeat=1):

    out._tensor[:] = np.transpose(a._tensor, axes).copy()
