(self)
return rv
Negate all elements of self.

        Examples
        ========

        >>> from sympy.matrices import SparseMatrix, eye
        >>> -SparseMatrix(eye(3))
        Matrix([
        [-1,  0,  0],
        [ 0, -1,  0],
        [ 0,  0, -1]])
Negate all elements of self.
Negate all elements of self .
def __neg__(self):
        """Negate all elements of self.

        Examples
        ========

        >>> from sympy.matrices import SparseMatrix, eye
        >>> -SparseMatrix(eye(3))
        Matrix([
        [-1,  0,  0],
        [ 0, -1,  0],
        [ 0,  0, -1]])

        """

        rv = self.copy()
        for k, v in rv._smat.items():
            rv._smat[k] = -v
        return rv
def __neg__ ( self ) : rv = self . copy ( ) for k , v in rv . _smat . items ( ) : rv . _smat [ k ] = - v return rv