pylops.BlockDiag¶
-
class
pylops.
BlockDiag
(ops, dtype=None)[source]¶ Block-diagonal operator.
Create a block-diagonal operator from N linear operators.
Parameters: - ops :
list
Linear operators to be stacked. Alternatively,
numpy.ndarray
orscipy.sparse
matrices can be passed in place of one or more operators.- dtype :
str
, optional Type of elements in input array.
Notes
A block-diagonal operator composed of N linear operators is created such as its application in forward mode leads to
\[\begin{split}\begin{bmatrix} \mathbf{L_1} & \mathbf{0} & ... & \mathbf{0} \\ \mathbf{0} & \mathbf{L_2} & ... & \mathbf{0} \\ ... & ... & ... & ... \\ \mathbf{0} & \mathbf{0} & ... & \mathbf{L_N} \end{bmatrix} \begin{bmatrix} \mathbf{x}_{1} \\ \mathbf{x}_{2} \\ ... \\ \mathbf{x}_{N} \end{bmatrix} = \begin{bmatrix} \mathbf{L_1} \mathbf{x}_{1} \\ \mathbf{L_2} \mathbf{x}_{2} \\ ... \\ \mathbf{L_N} \mathbf{x}_{N} \end{bmatrix}\end{split}\]while its application in adjoint mode leads to
\[\begin{split}\begin{bmatrix} \mathbf{L_1}^H \quad \mathbf{0} \quad ... \quad \mathbf{0} \\ \mathbf{0} \quad \mathbf{L_2}^H \quad ... \quad \mathbf{0} \\ ... \quad ... \quad ... \quad ... \\ \mathbf{0} \quad \mathbf{0} \quad ... \quad \mathbf{L_N}^H \end{bmatrix} \begin{bmatrix} \mathbf{y}_{1} \\ \mathbf{y}_{2} \\ ... \\ \mathbf{y}_{N} \end{bmatrix} = \begin{bmatrix} \mathbf{L_1}^H \mathbf{y}_{1} \\ \mathbf{L_2}^H \mathbf{y}_{2} \\ ... \\ \mathbf{L_N}^H \mathbf{y}_{N} \end{bmatrix}\end{split}\]Attributes: Methods
__init__
(self, ops[, dtype])Initialize this LinearOperator. adjoint
(self)Hermitian adjoint. apply_columns
(self, cols)Apply subset of columns of operator cond
(self, \*\*kwargs_eig)Condition number of linear operator. conj
(self)Complex conjugate operator div
(self, y[, niter])Solve the linear problem \(\mathbf{y}=\mathbf{A}\mathbf{x}\). dot
(self, x)Matrix-matrix or matrix-vector multiplication. eigs
(self[, neigs, symmetric, niter])Most significant eigenvalues of linear operator. matmat
(self, X)Matrix-matrix multiplication. matvec
(self, x)Matrix-vector multiplication. rmatmat
(self, X)Adjoint matrix-matrix multiplication. rmatvec
(self, x)Adjoint matrix-vector multiplication. todense
(self)Return dense matrix. transpose
(self)Transpose this linear operator. - ops :