dpnp.scipy.sparse.linalg.aslinearoperator¶
- dpnp.scipy.sparse.linalg.aslinearoperator(A) LinearOperator[source]¶
Return A as a
LinearOperator.For full documentation refer to
scipy.sparse.linalg.aslinearoperator.- Parameters:
- Aobject
The object to wrap. It may be any of the following:
a
LinearOperator(returned unchanged);a
dpnp.scipy.sparsesparse matrix, e.g.csr_matrix(the iterative solvers further specialise this to a cached oneMKL SpMV handle, bypassing densification);a 2-D array,
dpnp.ndarrayorusm_ndarray(promoted viadpnp.atleast_2d());an object exposing
.shapeand.matvec(and optionallyrmatvec/matmat/rmatmat/dtype).
- Returns:
- outLinearOperator
The A operand wrapped as a
LinearOperator.
See also
dpnp.scipy.sparse.linalg.LinearOperatorThe wrapped type.
Notes
A host
numpy.ndarrayis rejected: dpnp does not perform implicit host-to-device copies, which would defeat routing through the device. Transfer it withdpnp.asarrayfirst.