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)
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)