lib.utils.blockinv¶
- lib.utils.blockinv(blocks, inv=<function inv>, check=True)¶
Return inverse of input
blocksmatrix.- Parameters
blocks (list of list of arrays) – Input matrix to invert, in the form of blocks, e.g.
[[A,B],[C,D]].inv (callable, default=np.linalg.inv) – Function that takes in 2D array and returns its inverse.
check (bool, default=True) – If inversion inaccurate, raise a
LinAlgError(see_check_inv()).
- Returns
toret – Inverse of
blocksmatrix.- Return type
2D array