adelie.matrix.block_diag#
- adelie.matrix.block_diag(mats: list, *, n_threads: int = 1)[source]#
Creates a block-diagonal matrix given by the list of matrices.
If
mats
represents a list of matrices \(A_1,\ldots, A_L\), then the resulting matrix represents the block-diagonal matrix given by\[\begin{split}\begin{align*} \begin{bmatrix} A_1 & 0 & \cdots & 0 \\ 0 & A_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & A_L \end{bmatrix} \end{align*}\end{split}\]Note
This matrix only works for covariance method!
- Parameters:
- matslist
List of matrices to represent the block diagonal matrix.
- n_threadsint, optional
Number of threads. Default is
1
.
- Returns:
- wrap
Wrapper matrix object.