code: def transpose(self):
          
          if not self.isdiagonal:
              return type(self)(x=self.__x.copy().transpose(),
                                row_names=self.col_names,
                                col_names=self.row_names,
                                autoalign=self.autoalign)
          else:
              return type(self)(x=self.__x.copy(), row_names=self.row_names,
                                col_names=self.col_names,
                                isdiagonal=True, autoalign=self.autoalign)
docs: transpose operation of self
  
          Returns
          -------
          Matrix : Matrix
              transpose of self