Module ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg body ImportFrom alias Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameStore Num Assign NameStore AttributeLoad NameLoad attr For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body AugAssignAdd NameStore SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index TupleLoad NameLoad Num attr Index Num For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body AugAssignAdd NameStore SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index TupleLoad Num NameLoad attr Index Num Return TupleLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return ListComp AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad Num attr comprehension NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return ListComp AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Num NameLoad attr comprehension NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Return BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call NameLoad BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return BinOpMult NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad body Return Call NameLoad BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call NameLoad ListComp Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad comprehension NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr TupleLoad Num Num body Assign ListStore ListStore NameStore NameStore ListStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If Call NameLoad Call AttributeLoad NameLoad attr NameLoad body Return BinOpMult Call NameLoad NameLoad Call NameLoad BinOpSub NameLoad BinOpMult BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad Call AttributeLoad NameLoad attr NameLoad body Return BinOpMult Call NameLoad NameLoad Call NameLoad BinOpSub NameLoad BinOpMult BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareNotEq CompareLt NameLoad NameLoad NameLoad body Break orelse AugAssignSub NameStore NameLoad For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareNotEq CompareLt NameLoad NameLoad NameLoad body Break orelse AugAssignSub NameStore NameLoad Return SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad Index TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Return NameLoad For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body If BoolOpAnd CompareEq NameLoad NameLoad UnaryOpNot AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad attr body Return NameLoad If BoolOpAnd CompareNotEq NameLoad NameLoad UnaryOpNot AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad NameLoad body Return NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg body Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body ImportFrom alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListComp ListComp IfExp CompareEq NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Call NameLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr AttributeLoad SubscriptLoad NameLoad Index NameLoad attr comprehension NameStore Call NameLoad Call NameLoad NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad Return Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return TupleLoad Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults Str body Return Call NameLoad ListComp Call AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call NameLoad ListComp BinOpMult NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call NameLoad ListComp BinOpAdd NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Lambda arguments args NameParam defaults BoolOpAnd Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Dict NameLoad NameLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad TryExcept body Return Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr TupleLoad Num Num body Return SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Num Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index Num For NameStore SubscriptLoad NameLoad Slice Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return BinOpAdd Call NameLoad NameLoad NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return NameLoad Assign NameStore ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad If BoolOpAnd NameLoad Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr body Assign NameStore Call NameLoad ListComp Call NameLoad NameLoad comprehension NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr Return Call AttributeLoad Call NameLoad BinOpMult NameLoad Call NameLoad NameLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If BoolOpAnd CompareNotEq NameLoad Num Call NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore AttributeLoad Call NameLoad NameLoad attr Return Call NameLoad ListComp ListComp BinOpMult NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr comprehension NameStore Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Num While CompareLt BinOpAdd NameLoad Num Call NameLoad NameLoad body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad Num If BoolOpAnd Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num orelse If Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr Call NameLoad ListLoad ListLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num orelse If Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad Call NameLoad ListLoad ListLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num orelse AugAssignAdd NameStore Num Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad Call AttributeLoad AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr attr NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad If CompareNotEq NameLoad NameLoad body Return NameLoad Return Call NameLoad Call NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd Call NameLoad AttributeLoad NameLoad attr NameLoad CompareEq AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Num body Assign NameStore Call NameLoad ListLoad ListLoad Call AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num attr Return Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd Call NameLoad AttributeLoad NameLoad attr NameLoad CompareEq AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Num body Assign ListStore ListStore NameStore NameStore ListStore NameStore NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Return Call NameLoad ListLoad ListLoad AttributeLoad BinOpSub NameLoad BinOpMult BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad attr BinOpMult BinOpMult AttributeLoad UnaryOpUSub NameLoad attr NameLoad AttributeLoad BinOpSub NameLoad BinOpMult BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad attr ListLoad BinOpMult BinOpMult UnaryOpUSub AttributeLoad BinOpSub NameLoad BinOpMult BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad BinOpSub NameLoad BinOpMult BinOpMult NameLoad AttributeLoad NameLoad attr NameLoad attr orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return NameLoad Assign NameStore Lambda arguments args NameParam defaults IfExp Call NameLoad NameLoad NameLoad NameLoad Call NameLoad ListLoad ListLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ImportFrom alias TryExcept body Assign NameStore Call NameLoad Num Call NameLoad GeneratorExp SubscriptLoad AttributeLoad AttributeLoad SubscriptLoad NameLoad Index TupleLoad Num NameLoad attr attr Index Num comprehension NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num ListLoad For NameStore Call NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign NameStore Call NameLoad AttributeLoad SubscriptLoad NameLoad Index TupleLoad NameLoad Num attr For NameStore Call NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad UnaryOpNot Call NameLoad GeneratorExp CompareGt NameLoad Num comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Assign NameStore NameLoad Return Call NameLoad ListLoad ListLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad Num Num Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index Num Slice Num ListLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Num Index Num Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Num Slice Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Num Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad BinOpAdd NameLoad NameLoad AugAssignAdd NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call NameLoad ListComp ListComp Call NameLoad NameLoad NameLoad NameLoad comprehension NameStore NameLoad comprehension NameStore NameLoad decorator_list
N/A __future__ print_function division sympy ask Q sympy.core Basic Add sympify sympy.core.compatibility range sympy.strategies typed exhaust condition do_one unpack sympy.strategies.traverse bottom_up sympy.utilities sift sympy.matrices.expressions.matexpr MatrixExpr ZeroMatrix Identity sympy.matrices.expressions.matmul MatMul sympy.matrices.expressions.matadd MatAdd sympy.matrices.expressions.transpose Transpose transpose sympy.matrices.expressions.trace Trace sympy.matrices.expressions.determinant det Determinant sympy.matrices.expressions.slice MatrixSlice sympy.matrices.expressions.inverse Inverse sympy.matrices Matrix ShapeError BlockMatrix N/A MatrixExpr N/A N/A A BlockMatrix is a Matrix composed of other smaller, submatrices

    The submatrices are stored in a SymPy Matrix object but accessed as part of
    a Matrix Expression

    >>> from sympy import (MatrixSymbol, BlockMatrix, symbols,
    ...     Identity, ZeroMatrix, block_collapse)
    >>> n,m,l = symbols('n m l')
    >>> X = MatrixSymbol('X', n, n)
    >>> Y = MatrixSymbol('Y', m ,m)
    >>> Z = MatrixSymbol('Z', n, m)
    >>> B = BlockMatrix([[X, Z], [ZeroMatrix(m,n), Y]])
    >>> print(B)
    Matrix([
    [X, Z],
    [0, Y]])

    >>> C = BlockMatrix([[Identity(n), Z]])
    >>> print(C)
    Matrix([[I, Z]])

    >>> print(block_collapse(C*B))
    Matrix([[X, Z*Y + Z]])

     __new__ N/A N/A cls N/A args N/A sympy.matrices.immutable ImmutableMatrix N/A args N/A map sympify args N/A mat N/A ImmutableMatrix args N/A obj N/A N/A Basic __new__ cls mat N/A obj N/A shape N/A N/A self N/A N/A N/A numrows numcols 0 N/A M N/A self blocks N/A i N/A range N/A N/A M shape N/A 0 N/A N/A numrows N/A N/A N/A M N/A N/A i 0 shape N/A 0 N/A i N/A range N/A N/A M shape N/A 1 N/A N/A numcols N/A N/A N/A M N/A N/A 0 i shape N/A 1 N/A N/A numrows numcols N/A property blockshape N/A N/A self N/A N/A N/A N/A N/A self blocks shape N/A property blocks N/A N/A self N/A N/A N/A N/A N/A self args N/A 0 N/A property rowblocksizes N/A N/A self N/A N/A N/A N/A N/A N/A N/A self blocks N/A N/A i 0 rows N/A i N/A range N/A N/A self blockshape N/A 0 N/A property colblocksizes N/A N/A self N/A N/A N/A N/A N/A N/A N/A self blocks N/A N/A 0 i cols N/A i N/A range N/A N/A self blockshape N/A 1 N/A property structurally_equal N/A N/A self other N/A N/A N/A N/A N/A isinstance other BlockMatrix N/A N/A self shape N/A other shape N/A N/A self blockshape N/A other blockshape N/A N/A self rowblocksizes N/A other rowblocksizes N/A N/A self colblocksizes N/A other colblocksizes N/A _blockmul N/A N/A self other N/A N/A N/A N/A N/A isinstance other BlockMatrix N/A N/A self colblocksizes N/A other rowblocksizes N/A N/A N/A BlockMatrix N/A N/A self blocks N/A other blocks N/A N/A self other N/A _blockadd N/A N/A self other N/A N/A N/A N/A N/A isinstance other BlockMatrix N/A N/A self structurally_equal other N/A N/A N/A BlockMatrix N/A N/A self blocks N/A other blocks N/A N/A self other N/A _eval_transpose N/A N/A self N/A N/A N/A matrices N/A N/A transpose matrix N/A matrix N/A self blocks N/A M N/A Matrix N/A N/A self blockshape N/A 0 N/A N/A self blockshape N/A 1 matrices N/A M N/A N/A M transpose N/A N/A BlockMatrix M N/A _eval_trace N/A N/A self N/A N/A N/A N/A N/A self rowblocksizes N/A self colblocksizes N/A N/A N/A Add N/A N/A Trace N/A N/A self blocks N/A N/A i i N/A i N/A range N/A N/A self blockshape N/A 0 N/A N/A NotImplementedError Can't perform trace of irregular blockshape N/A _eval_determinant N/A N/A self N/A N/A N/A N/A N/A self blockshape N/A 2 2 N/A N/A N/A N/A A B N/A C D N/A N/A N/A self blocks tolist N/A N/A ask N/A N/A Q invertible A N/A N/A N/A N/A det A N/A det N/A D N/A N/A C N/A A I B N/A N/A N/A ask N/A N/A Q invertible D N/A N/A N/A N/A det D N/A det N/A A N/A N/A B N/A D I C N/A N/A Determinant self N/A transpose N/A N/A self N/A N/A N/A Return transpose of matrix.

        Examples
        ========

        >>> from sympy import MatrixSymbol, BlockMatrix, ZeroMatrix
        >>> from sympy.abc import l, m, n
        >>> X = MatrixSymbol('X', n, n)
        >>> Y = MatrixSymbol('Y', m ,m)
        >>> Z = MatrixSymbol('Z', n, m)
        >>> B = BlockMatrix([[X, Z], [ZeroMatrix(m,n), Y]])
        >>> B.transpose()
        Matrix([
        [X',  0],
        [Z', Y']])
        >>> _.transpose()
        Matrix([
        [X, Z],
        [0, Y]])
         N/A N/A N/A self _eval_transpose N/A _entry N/A N/A self i j N/A N/A N/A N/A row_block numrows N/A enumerate N/A self rowblocksizes N/A N/A N/A N/A i numrows False N/A N/A N/A N/A i numrows N/A N/A col_block numcols N/A enumerate N/A self colblocksizes N/A N/A N/A N/A j numcols False N/A N/A N/A N/A j numcols N/A N/A N/A N/A self blocks N/A N/A row_block col_block N/A N/A i j N/A is_Identity N/A N/A self N/A N/A N/A N/A N/A N/A self blockshape N/A 0 N/A N/A self blockshape N/A 1 N/A N/A False N/A i N/A range N/A N/A self blockshape N/A 0 N/A N/A j N/A range N/A N/A self blockshape N/A 1 N/A N/A N/A N/A i j N/A N/A N/A N/A self blocks N/A N/A i j is_Identity N/A N/A False N/A N/A N/A i j N/A N/A N/A N/A self blocks N/A N/A i j is_ZeroMatrix N/A N/A False N/A True N/A property is_structurally_symmetric N/A N/A self N/A N/A N/A N/A N/A self rowblocksizes N/A self colblocksizes N/A property equals N/A N/A self other N/A N/A N/A N/A self other N/A N/A True N/A N/A N/A isinstance other BlockMatrix N/A N/A self blocks N/A other blocks N/A N/A True N/A N/A N/A N/A super BlockMatrix self equals other N/A N/A BlockDiagMatrix N/A BlockMatrix N/A N/A 
    A BlockDiagMatrix is a BlockMatrix with matrices only along the diagonal

    >>> from sympy import MatrixSymbol, BlockDiagMatrix, symbols, Identity
    >>> n,m,l = symbols('n m l')
    >>> X = MatrixSymbol('X', n, n)
    >>> Y = MatrixSymbol('Y', m ,m)
    >>> BlockDiagMatrix(X, Y)
    Matrix([
    [X, 0],
    [0, Y]])

     __new__ N/A N/A cls N/A mats N/A N/A N/A N/A Basic __new__ BlockDiagMatrix mats N/A diag N/A N/A self N/A N/A N/A N/A self args N/A property blocks N/A N/A self N/A N/A sympy.matrices.immutable ImmutableMatrix N/A mats N/A self args N/A data N/A N/A N/A N/A i j N/A mats N/A i N/A ZeroMatrix N/A N/A mats N/A i rows N/A N/A mats N/A j cols N/A j N/A range N/A len mats N/A i N/A range N/A len mats N/A N/A ImmutableMatrix data N/A property shape N/A N/A self N/A N/A N/A N/A N/A sum N/A N/A block rows N/A block N/A self args N/A sum N/A N/A block cols N/A block N/A self args N/A property blockshape N/A N/A self N/A N/A N/A n N/A len N/A self args N/A N/A n n N/A property rowblocksizes N/A N/A self N/A N/A N/A N/A N/A block rows N/A block N/A self args N/A property colblocksizes N/A N/A self N/A N/A N/A N/A N/A block cols N/A block N/A self args N/A property _eval_inverse N/A N/A self expand N/A ignored N/A N/A N/A BlockDiagMatrix N/A N/A N/A mat inverse N/A mat N/A self args N/A _blockmul N/A N/A self other N/A N/A N/A N/A N/A isinstance other BlockDiagMatrix N/A N/A self colblocksizes N/A other rowblocksizes N/A N/A N/A BlockDiagMatrix N/A N/A a b N/A N/A a b N/A zip N/A self args N/A other args N/A N/A N/A N/A BlockMatrix _blockmul self other N/A _blockadd N/A N/A self other N/A N/A N/A N/A N/A isinstance other BlockDiagMatrix N/A N/A self blockshape N/A other blockshape N/A N/A self rowblocksizes N/A other rowblocksizes N/A N/A self colblocksizes N/A other colblocksizes N/A N/A N/A BlockDiagMatrix N/A N/A a b N/A N/A a b N/A zip N/A self args N/A other args N/A N/A N/A N/A BlockMatrix _blockadd self other N/A N/A block_collapse N/A N/A expr N/A N/A N/A Evaluates a block matrix expression

    >>> from sympy import MatrixSymbol, BlockMatrix, symbols,                           Identity, Matrix, ZeroMatrix, block_collapse
    >>> n,m,l = symbols('n m l')
    >>> X = MatrixSymbol('X', n, n)
    >>> Y = MatrixSymbol('Y', m ,m)
    >>> Z = MatrixSymbol('Z', n, m)
    >>> B = BlockMatrix([[X, Z], [ZeroMatrix(m, n), Y]])
    >>> print(B)
    Matrix([
    [X, Z],
    [0, Y]])

    >>> C = BlockMatrix([[Identity(n), Z]])
    >>> print(C)
    Matrix([[I, Z]])

    >>> print(block_collapse(C*B))
    Matrix([[X, Z*Y + Z]])
     N/A hasbm N/A N/A N/A expr N/A N/A N/A isinstance expr MatrixExpr N/A N/A expr has BlockMatrix N/A rule N/A exhaust N/A bottom_up N/A exhaust N/A condition hasbm N/A typed N/A MatAdd MatMul Transpose Inverse BlockMatrix N/A do_one bc_matadd bc_block_plus_ident N/A do_one bc_matmul bc_dist bc_transpose bc_inverse N/A do_one bc_unpack deblock N/A result N/A rule expr N/A N/A N/A N/A N/A result doit N/A N/A N/A AttributeError N/A N/A result N/A bc_unpack N/A N/A expr N/A N/A N/A N/A N/A expr blockshape N/A 1 1 N/A N/A N/A N/A expr blocks N/A N/A 0 0 N/A expr N/A bc_matadd N/A N/A expr N/A N/A N/A args N/A sift N/A expr args N/A N/A N/A M N/A N/A isinstance M BlockMatrix N/A blocks N/A args N/A True N/A N/A blocks N/A N/A expr N/A nonblocks N/A args N/A False N/A block N/A blocks N/A 0 N/A b N/A blocks N/A 1 N/A N/A block N/A N/A block _blockadd b N/A nonblocks N/A N/A N/A N/A MatAdd nonblocks block N/A N/A block N/A bc_block_plus_ident N/A N/A expr N/A N/A N/A idents N/A arg N/A arg N/A expr args N/A arg is_Identity N/A N/A idents N/A N/A expr N/A blocks N/A arg N/A arg N/A expr args N/A isinstance arg BlockMatrix N/A N/A blocks N/A all N/A N/A N/A b structurally_equal N/A blocks N/A 0 N/A b blocks N/A N/A blocks N/A 0 is_structurally_symmetric N/A N/A block_id N/A BlockDiagMatrix N/A N/A Identity k N/A k N/A N/A blocks N/A 0 rowblocksizes N/A N/A N/A N/A MatAdd N/A block_id N/A len idents blocks doit N/A expr N/A bc_dist N/A N/A expr N/A N/A N/A  Turn  a*[X, Y] into [a*X, a*Y]  N/A N/A factor mat N/A N/A expr as_coeff_mmul N/A N/A N/A factor 1 N/A isinstance N/A unpack mat BlockMatrix N/A N/A B N/A N/A unpack mat blocks N/A N/A BlockMatrix N/A N/A N/A factor N/A B N/A N/A i j N/A j N/A range N/A B cols N/A i N/A range N/A B rows N/A expr N/A bc_matmul N/A N/A expr N/A N/A N/A N/A factor matrices N/A N/A expr as_coeff_matrices N/A i 0 N/A N/A N/A i 1 N/A len matrices N/A N/A N/A A B N/A matrices N/A i N/A i 2 N/A N/A N/A isinstance A BlockMatrix N/A isinstance B BlockMatrix N/A N/A N/A matrices N/A i N/A N/A A _blockmul B N/A N/A N/A matrices pop N/A i 1 N/A N/A N/A isinstance A BlockMatrix N/A N/A N/A matrices N/A i N/A N/A A _blockmul N/A BlockMatrix N/A N/A B N/A N/A N/A matrices pop N/A i 1 N/A N/A N/A isinstance B BlockMatrix N/A N/A N/A matrices N/A i N/A N/A N/A BlockMatrix N/A N/A A _blockmul B N/A N/A N/A matrices pop N/A i 1 N/A N/A i 1 N/A N/A N/A N/A MatMul factor matrices doit N/A bc_transpose N/A N/A expr N/A N/A N/A N/A BlockMatrix N/A N/A N/A N/A N/A block_collapse N/A expr arg blocks applyfunc transpose T N/A bc_inverse N/A N/A expr N/A N/A N/A expr2 N/A blockinverse_1x1 expr N/A N/A expr expr2 N/A N/A expr2 N/A N/A blockinverse_2x2 N/A Inverse N/A reblock_2x2 N/A expr arg N/A blockinverse_1x1 N/A N/A expr N/A N/A N/A N/A N/A isinstance N/A expr arg BlockMatrix N/A N/A N/A expr arg blockshape N/A 1 1 N/A N/A mat N/A Matrix N/A N/A N/A N/A N/A N/A N/A expr arg blocks N/A 0 inverse N/A N/A BlockMatrix mat N/A expr N/A blockinverse_2x2 N/A N/A expr N/A N/A N/A N/A N/A isinstance N/A expr arg BlockMatrix N/A N/A N/A expr arg blockshape N/A 2 2 N/A N/A N/A N/A A B N/A C D N/A N/A N/A N/A expr arg blocks tolist N/A N/A BlockMatrix N/A N/A N/A N/A A N/A N/A B N/A D I C I N/A N/A N/A N/A A I B N/A N/A D N/A N/A C N/A A I B I N/A N/A N/A N/A N/A N/A D N/A N/A C N/A A I B I C N/A A I N/A N/A D N/A N/A C N/A A I B I N/A N/A expr N/A deblock N/A N/A B N/A N/A N/A  Flatten a BlockMatrix of BlockMatrices  N/A N/A N/A N/A isinstance B BlockMatrix N/A N/A N/A N/A B blocks has BlockMatrix N/A N/A B N/A wrap N/A N/A N/A x N/A N/A N/A isinstance x BlockMatrix x N/A BlockMatrix N/A N/A x N/A bb N/A N/A N/A B blocks applyfunc wrap sympy Matrix N/A N/A N/A MM N/A Matrix 0 N/A sum N/A N/A N/A N/A N/A bb N/A N/A 0 i blocks shape N/A 1 N/A i N/A range N/A N/A bb shape N/A 1 N/A N/A row N/A range 0 N/A N/A bb shape N/A 0 N/A N/A M N/A Matrix N/A N/A bb N/A N/A row 0 blocks N/A col N/A range 1 N/A N/A bb shape N/A 1 N/A N/A M N/A N/A M row_join N/A N/A bb N/A N/A row col blocks N/A MM N/A N/A MM col_join M N/A N/A BlockMatrix MM N/A N/A N/A ShapeError N/A N/A B N/A reblock_2x2 N/A N/A B N/A N/A N/A  Reblock a BlockMatrix so that it has 2x2 blocks of block matrices  N/A N/A N/A N/A isinstance B BlockMatrix N/A N/A all N/A N/A d 2 N/A d N/A N/A B blocks shape N/A N/A B N/A BM BlockMatrix N/A N/A BM N/A N/A N/A N/A B blocks N/A N/A 0 0 N/A BM N/A N/A B blocks N/A N/A 0 N/A 1 N/A N/A BM N/A N/A B blocks N/A N/A 1 N/A 0 N/A BM N/A N/A B blocks N/A N/A 1 N/A 1 N/A bounds N/A N/A sizes N/A N/A N/A  Convert sequence of numbers into pairs of low-high pairs

    >>> from sympy.matrices.expressions.blockmatrix import bounds
    >>> bounds((1, 10, 50))
    [(0, 1), (1, 11), (11, 61)]
     N/A low 0 N/A rv N/A N/A size sizes N/A N/A N/A N/A rv append N/A low N/A low size N/A low size N/A rv N/A blockcut N/A N/A expr rowsizes colsizes N/A N/A N/A  Cut a matrix expression into Blocks

    >>> from sympy import ImmutableMatrix, blockcut
    >>> M = ImmutableMatrix(4, 4, range(16))
    >>> B = blockcut(M, (1, 3), (1, 3))
    >>> type(B).__name__
    'BlockMatrix'
    >>> ImmutableMatrix(B.blocks[0, 1])
    Matrix([[1, 2, 3]])
     N/A rowbounds N/A bounds rowsizes N/A colbounds N/A bounds colsizes N/A N/A BlockMatrix N/A N/A N/A MatrixSlice expr rowbound colbound N/A colbound colbounds N/A rowbound rowbounds N/A