pylops.VStack¶
-
class
pylops.VStack(ops, nproc=1, dtype=None)[source]¶ Vertical stacking.
Stack a set of N linear operators vertically.
Parameters: - ops :
list Linear operators to be stacked. Alternatively,
numpy.ndarrayorscipy.sparsematrices can be passed in place of one or more operators.- nproc :
int, optional Number of processes used to evaluate the N operators in parallel using
multiprocessing. Ifnproc=1, work in serial mode.- dtype :
str, optional Type of elements in input array.
Raises: - ValueError
If
opshave different number of rows
Notes
A vertical stack of N linear operators is created such as its application in forward mode leads to
\[\begin{split}\begin{bmatrix} \mathbf{L}_{1} \\ \mathbf{L}_{2} \\ \vdots \\ \mathbf{L}_{N} \end{bmatrix} \mathbf{x} = \begin{bmatrix} \mathbf{L}_{1} \mathbf{x} \\ \mathbf{L}_{2} \mathbf{x} \\ \vdots \\ \mathbf{L}_{N} \mathbf{x} \end{bmatrix} = \begin{bmatrix} \mathbf{y}_{1} \\ \mathbf{y}_{2} \\ \vdots \\ \mathbf{y}_{N} \end{bmatrix}\end{split}\]while its application in adjoint mode leads to
\[\begin{split}\begin{bmatrix} \mathbf{L}_{1}^H & \mathbf{L}_{2}^H & \ldots & \mathbf{L}_{N}^H \end{bmatrix} \begin{bmatrix} \mathbf{y}_{1} \\ \mathbf{y}_{2} \\ \vdots \\ \mathbf{y}_{N} \end{bmatrix} = \mathbf{L}_{1}^H \mathbf{y}_1 + \mathbf{L}_{2}^H \mathbf{y}_2 + \ldots + \mathbf{L}_{N}^H \mathbf{y}_N\end{split}\]Attributes: Methods
__init__(ops[, nproc, dtype])Initialize this LinearOperator. adjoint()Hermitian adjoint. apply_columns(cols)Apply subset of columns of operator cond([uselobpcg])Condition number of linear operator. conj()Complex conjugate operator div(y[, niter, densesolver])Solve the linear problem \(\mathbf{y}=\mathbf{A}\mathbf{x}\). dot(x)Matrix-matrix or matrix-vector multiplication. eigs([neigs, symmetric, niter, uselobpcg])Most significant eigenvalues of linear operator. matmat(X)Matrix-matrix multiplication. matvec(x)Matrix-vector multiplication. rmatmat(X)Matrix-matrix multiplication. rmatvec(x)Adjoint matrix-vector multiplication. todense([backend])Return dense matrix. toimag([forw, adj])Imag operator toreal([forw, adj])Real operator tosparse()Return sparse matrix. trace([neval, method, backend])Trace of linear operator. transpose()Transpose this linear operator. - ops :