(self)
return self.__class__(
            backend=self.backend,
            shape=shape,
            dtype=self.dtype,
            allocator=self.allocator,
            base=self,
            gpudata=self.gpudata,
            strides=strides,
            is_trans=not self.is_trans,
            name=self.name,
            rounding=self.rounding)
Return a transposed view.
Return a transposed view.
Return a transposed view .
def T(self):
        """
        Return a transposed view.
        """
        if len(self.shape) <= 2:
            shape = self.shape[::-1]
            strides = self.strides[::-1]
        else:
            # support for batched dot.
            # perserve outer dimension but reverse inner dims
            shape = list(self.shape[::-1])
            strides = list(self.strides[::-1])
            shape = tuple(shape[-1:] + shape[:-1])
            strides = tuple(strides[-1:] + strides[:-1])

        return self.__class__(
            backend=self.backend,
            shape=shape,
            dtype=self.dtype,
            allocator=self.allocator,
            base=self,
            gpudata=self.gpudata,
            strides=strides,
            is_trans=not self.is_trans,
            name=self.name,
            rounding=self.rounding)
def T ( self ) : if len ( self . shape ) <= 2 : shape = self . shape [ : : - 1 ] strides = self . strides [ : : - 1 ] else : # support for batched dot. # perserve outer dimension but reverse inner dims shape = list ( self . shape [ : : - 1 ] ) strides = list ( self . strides [ : : - 1 ] ) shape = tuple ( shape [ - 1 : ] + shape [ : - 1 ] ) strides = tuple ( strides [ - 1 : ] + strides [ : - 1 ] ) return self . __class__ ( backend = self . backend , shape = shape , dtype = self . dtype , allocator = self . allocator , base = self , gpudata = self . gpudata , strides = strides , is_trans = not self . is_trans , name = self . name , rounding = self . rounding )