@property
    def is_hermitian(self):
        """Checks if the matrix is Hermitian.

        In a Hermitian matrix element i,j is the complex conjugate of
        element j,i.

        Examples
        ========

        >>> from sympy.matrices import SparseMatrix
        >>> from sympy import I
        >>> from sympy.abc import x
        >>> a = SparseMatrix([[1, I], [-I, 1]])
        >>> a
        Matrix([
        [ 1, I],
        [-I, 1]])
        >>> a.is_hermitian
        True
        >>> a[0, 0] = 2*I
        >>> a.is_hermitian
        False
        >>> a[0, 0] = x
        >>> a.is_hermitian
        >>> a[0, 1] = a[1, 0]*I
        >>> a.is_hermitian
        False
        """
        def cond():
            d = self._smat
            yield self.is_square
            if self.rows <= len(d):
                yield fuzzy_and(
                    d[i, i].is_real for i, j in d if i == j)
            else:
                yield fuzzy_and(
                    d[i, i].is_real for i in range(self.rows) if (i, i) in d)
            yield fuzzy_and(
                    ((self[i, j] - self[j, i].conjugate()).is_zero
                    if (j, i) in d else False) for (i, j) in d)
        return fuzzy_and(i for i in cond())
dataset/ETHPy150Open sympy/sympy/sympy/matrices/sparse.py/SparseMatrix.is_hermitian/swapped operands of `<=`