code: def issymmetric(am):
      r
      if am.shape[0] != am.shape[1]:
          logger.warning('Matrix is not square, symmetrical is irrelevant')
          return False
      if am.format != 'coo':
          am = am.tocoo(copy=False)
      if istril(am) or istriu(am):
          return False
      # Compare am with its transpose, element wise
      sym = ((am != am.T).size) == 0
      return sym
docs: r"""
      A method to check if a square matrix is symmetric
      Returns ``True`` if the sparse adjacency matrix is symmetric