bayespy.utils.misc.block_banded

bayespy.utils.misc.block_banded(D, B)[source]

Construct a symmetric block-banded matrix.

D contains square diagonal blocks. B contains super-diagonal blocks.

The resulting matrix is:

D[0], B[0], 0, 0, …, 0, 0, 0 B[0].T, D[1], B[1], 0, …, 0, 0, 0 0, B[1].T, D[2], B[2], …, …, …, … … … … … …, B[N-2].T, D[N-1], B[N-1] 0, 0, 0, 0, …, 0, B[N-1].T, D[N]