jax.scipy.linalg.block_diagΒΆ
-
jax.scipy.linalg.block_diag(*arrs)[source]ΒΆ Create a block diagonal matrix from provided arrays.
LAX-backend implementation of
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]]
- Parameters
A (array_like, up to 2-D) β Input arrays. A 1-D array or array_like sequence of length n is treated as a 2-D array with shape
(1,n).B (array_like, up to 2-D) β Input arrays. A 1-D array or array_like sequence of length n is treated as a 2-D array with shape
(1,n).C (array_like, up to 2-D) β Input arrays. A 1-D array or array_like sequence of length n is treated as a 2-D array with shape
(1,n)... (array_like, up to 2-D) β Input arrays. A 1-D array or array_like sequence of length n is treated as a 2-D array with shape
(1,n).
- Returns
D β Array with A, B, C, β¦ on the diagonal. D has the same dtype as A.
- Return type