'Return a transposed view.
For 2D tensor, will do a normal transpose
For 3D tensor, will keep the 0 dim, swap the 1 and 2 dimensions'

@property
def T(self):

    if (len(self.shape) <= 2):
        ary = self._tensor.transpose()
    else:
        ary = self._tensor.swapaxes(1, 2)
    return self.__class__(backend=self.backend, ary=ary, dtype=self._tensor.dtype, base=self)
