(self, other)
return self.scalar_multiply(other)
Return product the same type as other (if a Matrix).

        When multiplying be a non-sparse matrix, the result is no longer
        sparse.

        Examples
        ========

        >>> from sympy.matrices import Matrix, SparseMatrix
        >>> A = Matrix(2, 2, range(1, 5))
        >>> S = SparseMatrix(2, 2, range(2, 6))
        >>> A*S == S*A
        False
        >>> (isinstance(A*S, SparseMatrix) ==
        ...  isinstance(S*A, SparseMatrix) == False)
        True
Return product the same type as other (if a Matrix).
Return product the same type as other ( if a Matrix ) .
def __rmul__(self, other):
        """Return product the same type as other (if a Matrix).

        When multiplying be a non-sparse matrix, the result is no longer
        sparse.

        Examples
        ========

        >>> from sympy.matrices import Matrix, SparseMatrix
        >>> A = Matrix(2, 2, range(1, 5))
        >>> S = SparseMatrix(2, 2, range(2, 6))
        >>> A*S == S*A
        False
        >>> (isinstance(A*S, SparseMatrix) ==
        ...  isinstance(S*A, SparseMatrix) == False)
        True
        """
        if isinstance(other, MatrixBase):
            return other*other._new(self)
        return self.scalar_multiply(other)
def __rmul__ ( self , other ) : if isinstance ( other , MatrixBase ) : return other * other . _new ( self ) return self . scalar_multiply ( other )