dpnp.scipy.sparse.linalg.minres

dpnp.scipy.sparse.linalg.minres(A, b, x0: dpnp_array | None = None, *, rtol: float = 1e-05, shift: float = 0.0, maxiter: int | None = None, M=None, callback: Callable | None = None, show: bool = False, check: bool = False) → tuple[dpnp_array, int][source]

Use MINimum RESidual iteration to solve Ax = b.

Solves the symmetric (possibly indefinite) system Ax = b or, if shift is nonzero, (A - shift*I)x = b. All computation stays on the SYCL device; only scalar recurrence coefficients and norms are transferred to the host for branching.

For full documentation refer to scipy.sparse.linalg.minres.

Parameters:
A{dpnp.ndarray, usm_ndarray, LinearOperator, csr_matrix}

The real symmetric or complex Hermitian operator, shape (N, N).

b{dpnp.ndarray, usm_ndarray}

Right-hand side, shape (N,) or (N, 1).

x0{None, dpnp.ndarray, usm_ndarray}, optional

Starting guess for the solution. Default: None (zeros).

shiftfloat, optional

If nonzero, solve (A - shift*I)x = b. Default: 0.0.

rtolfloat, optional

Relative convergence tolerance. Default: 1e-5.

maxiter{None, int}, optional

Maximum number of iterations. Default: 5 * N.

M{None, dpnp.ndarray, usm_ndarray, LinearOperator}, optional

Preconditioner approximating the inverse of A. Default: None.

callback{None, callable}, optional

Called as callback(xk) after each iteration. Default: None.

showbool, optional

If True, print a convergence summary each iteration. Default: False.

checkbool, optional

If True, verify that A and M are symmetric before iterating (costs extra matvecs). Default: False.

Returns:
xdpnp.ndarray

The converged (or best) solution.

infoint

0 if converged, maxiter if the iteration limit was reached.

Notes

This is a direct translation of the Paige--Saunders MINRES algorithm as implemented in SciPy, adapted for dpnp device arrays with the oneMKL SpMV cached-handle fast-path.