コード例 #1
0
ファイル: blockmatrix.py プロジェクト: BDGLunde/sympy
    def _blockadd(self, other):

        if  (other.is_Matrix and other.is_BlockMatrix and
                self.blockshape == other.blockshape and
                self.rowblocksizes == other.rowblocksizes and
                self.colblocksizes == other.colblocksizes):
            return BlockMatrix(self.mat + other.mat)

        return MatrixExpr.__add__(self, other)
コード例 #2
0
ファイル: blockmatrix.py プロジェクト: FireJade/sympy
    def _blockadd(self, other):
        if   (other.is_Matrix and other.is_BlockMatrix
                and self.structurally_equal(other)):
            return BlockMatrix(self.blocks + other.blocks)

        return MatrixExpr.__add__(self, other)
コード例 #3
0
    def _blockadd(self, other):
        if (other.is_Matrix and other.is_BlockMatrix
                and self.structurally_equal(other)):
            return BlockMatrix(self.blocks + other.blocks)

        return MatrixExpr.__add__(self, other)