This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / optimize / _root / _root_krylov_doc

function

scipy.optimize._root:_root_krylov_doc

source: build-install/usr/lib/python3.14/site-packages/scipy/optimize/_root.py:663

Signature

def _root_krylov_doc()

Parameters

nit : int, optional

Number of iterations to make. If omitted (default), make as many as required to meet tolerances.

disp : bool, optional

Print status to stdout on every iteration.

maxiter : int, optional

Maximum number of iterations to make.

ftol : float, optional

Relative tolerance for the residual. If omitted, not used.

fatol : float, optional

Absolute tolerance (in max-norm) for the residual. If omitted, default is 6e-6.

xtol : float, optional

Relative minimum step size. If omitted, not used.

xatol : float, optional

Absolute minimum step size, as determined from the Jacobian approximation. If the step size is smaller than this, optimization is terminated as successful. If omitted, not used.

tol_norm : function(vector) -> scalar, optional

Norm to use in convergence check. Default is the maximum norm.

line_search : {None, 'armijo' (default), 'wolfe'}, optional

Which type of a line search to use to determine the step size in the direction given by the Jacobian approximation. Defaults to 'armijo'.

jac_options : dict, optional

Options for the respective Jacobian approximation.

rdiff

Relative step size to use in numerical differentiation.

method

Krylov method to use to approximate the Jacobian. Can be a string, or a function implementing the same interface as the iterative solvers in scipy.sparse.linalg. If a string, needs to be one of: 'lgmres', 'gmres', 'bicgstab', 'cgs', 'minres', 'tfqmr'.

The default is scipy.sparse.linalg.lgmres.

inner_M

Preconditioner for the inner Krylov iteration. Note that you can use also inverse Jacobians as (adaptive) preconditioners. For example,

>>> jac = BroydenFirst()
>>> kjac = KrylovJacobian(inner_M=jac.inverse).

If the preconditioner has a method named 'update', it will be called as update(x, f) after each nonlinear step, with x giving the current point, and f the current function value.

inner_rtol, inner_atol, inner_callback, ...

Parameters to pass on to the "inner" Krylov solver.

For a full list of options, see the documentation for the solver you are using. By default this is scipy.sparse.linalg.lgmres. If the solver has been overridden through method, see the documentation for that solver instead. To use an option for that solver, prepend inner_ to it. For example, to control the rtol argument to the solver, set the inner_rtol option here.

outer_k

Size of the subspace kept across LGMRES nonlinear iterations.

See scipy.sparse.linalg.lgmres for details.

Aliases

  • scipy.optimize._root._root_krylov_doc