dpnp.scipy.sparse.linalg.LinearOperator¶
- class dpnp.scipy.sparse.linalg.LinearOperator(*args, **kwargs)[source]¶
Common interface for performing matrix-vector products, backed by dpnp arrays.
Iterative solvers (
cg,gmres,minres) only require the matrix-vector productA @ vand never the individual matrix entries. This class is the abstract interface between such solvers and matrix-like objects. Construct it either by passing callables to the constructor, or by subclassing and implementing_matvec(and optionally_rmatvec/_matmat/_rmatmat). It also supports the full operator algebra (+,@, scaling, power, adjointA.H, transposeA.T), each producing a new lazyLinearOperator.For full documentation refer to
scipy.sparse.linalg.LinearOperator.- Parameters:
- shapetuple of int
Operator dimensions
(M, N).- matveccallable
Returns
A @ vfor a 1-D v.- rmatveccallable, optional
Returns
A^H @ v(conjugate transpose applied to v).- matmatcallable, optional
Returns
A @ Vfor a dense 2-D V of shape(N, K).- dtypedtype, optional
Data type of the operator. Inferred from a trial
matvecwhenNone.- rmatmatcallable, optional
Returns
A^H @ Vfor a dense 2-D V of shape(M, K).
- Attributes:
- argstuple
For composite operators (sum, product, ...), the operands of the binary operation.
- ndimint
Number of dimensions, always
2.