cupyx.scipy.sparse.linalg.minres#
- cupyx.scipy.sparse.linalg.minres(A, b, x0=None, shift=0.0, tol=1e-05, maxiter=None, M=None, callback=None, check=False)[source]#
Uses MINimum RESidual iteration to solve
Ax = b.- Parameters:
A (ndarray, spmatrix or LinearOperator) – The real or complex matrix of the linear system with shape
(n, n).b (cupy.ndarray) – Right hand side of the linear system with shape
(n,)or(n, 1).x0 (cupy.ndarray) – Starting guess for the solution.
shift (int or float) – If shift != 0 then the method solves
(A - shift*I)x = btol (float) – Tolerance for convergence.
maxiter (int) – Maximum number of iterations.
M (ndarray, spmatrix or LinearOperator) – Preconditioner for
A. The preconditioner should approximate the inverse ofA.Mmust becupy.ndarray,cupyx.scipy.sparse.spmatrixorcupyx.scipy.sparse.linalg.LinearOperator.callback (function) – User-specified function to call after each iteration. It is called as
callback(xk), wherexkis the current solution vector.
- Returns:
It returns
x(cupy.ndarray) andinfo(int) wherexis the converged solution andinfoprovides convergence information.- Return type:
See also