adelie.matrix.block_diag#
- adelie.matrix.block_diag(mats: list, *, method: str = 'naive', n_threads: int = 1)[source]#
Creates a block-diagonal matrix given by the list of matrices.
If
mats
represents a list of matrices , then the resulting matrix represents the block-diagonal matrix given byNote
The routines for this matrix are faster when there are many small blocks rather than few large blocks.
- Parameters:
- matslist
List of matrices to represent the block diagonal matrix.
- methodstr, optional
Method type. It must be one of the following:
"naive"
: naive matrix."cov"
: covariance matrix.
Default is
"naive"
.- n_threadsint, optional
Number of threads. Default is
1
.
- Returns:
- wrap
Wrapper matrix object.