jax.scipy.linalg.block_diag#

jax.scipy.linalg.block_diag(*arrs)[source]#

Create a block diagonal matrix from provided arrays.

LAX-backend implementation of scipy.linalg._special_matrices.block_diag().

Original docstring below.

Given the inputs A, B and C, the output will have these arrays arranged on the diagonal:

[[A, 0, 0],
 [0, B, 0],
 [0, 0, C]]
Returns

D – Array with A, B, C, … on the diagonal. D has the same dtype as A.

Return type

ndarray

Parameters

arrs (Union[Array, ndarray, bool_, number, bool, int, float, complex]) –