def __eq__(self, other):
        try:
            if self.shape != other.shape:
                return False
            if isinstance(other, SparseMatrix):
                return self._smat == other._smat
            elif isinstance(other, MatrixBase):
                return self._smat == MutableSparseMatrix(other)._smat
        except __HOLE__:
            return False
dataset/ETHPy150Open sympy/sympy/sympy/matrices/sparse.py/SparseMatrix.__eq__