pylops_distributed.Diagonal¶
-
class
pylops_distributed.
Diagonal
(diag, dims=None, dir=0, compute=(False, False), todask=(False, False), dtype='float64')[source]¶ Diagonal operator.
Applies element-wise multiplication of the input vector with the vector
diag
in forward and with its complex conjugate in adjoint mode.This operator can also broadcast; in this case the input vector is reshaped into its dimensions
dims
and the element-wise multiplication withdiag
is perfomed on the directiondir
. Note that the vectordiag
will need to have size equal todims[dir]
.Parameters: - diag :
dask.array.ndarray
Vector to be used for element-wise multiplication.
- dims :
list
, optional Number of samples for each dimension (
None
if only one dimension is available)- dir :
int
, optional Direction along which multiplication is applied.
- compute :
tuple
, optional Compute the outcome of forward and adjoint or simply define the graph and return a
dask.array.array
- todask :
tuple
, optional Apply
dask.array.from_array
to model and data before applying forward and adjoint respectively- dtype :
str
, optional Type of elements in input array.
Notes
Refer to
pylops.basicoperators.Diagonal
for implementation details.Attributes: Methods
__init__
(diag[, dims, dir, compute, todask, …])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])Solve the linear problem \(\mathbf{y}=\mathbf{A}\mathbf{x}\). dot
(x)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)Adjoint matrix-matrix multiplication. rmatvec
(x)Adjoint Matrix-vector multiplication. todense
()Return dense matrix. tosparse
()Return sparse matrix. transpose
()Transpose this linear operator. - diag :