{ } Raw JSON

bundles / scipy 1.18.0 / scipy / optimize / _minpack / _hybrd

built-in

scipy.optimize._minpack:_hybrd

Signature

built-in_hybrd(fun, x0, args, full_output, xtol, maxfev, ml, mu, epsfcn, factor, diag)

Summary

Hybrid method for finding roots of a system of equations.

Extended Summary

Solves fun(x) = 0 using a modification of the Powell hybrid method.

Parameters

fun : callable

Function to minimize. Takes x as first argument.

x0 : ndarray, shape (n,)

Initial guess, float64.

args : tuple

Extra arguments passed to fun.

full_output : int

Non-zero to return optional outputs.

xtol : float

Relative tolerance for solution. Default: 1.49012e-8.

maxfev : int

Maximum number of function evaluations. Default: 200*(n+1).

ml : int

Number of subdiagonals in banded Jacobian. Default: n-1.

mu : int

Number of superdiagonals in banded Jacobian. Default: n-1.

epsfcn : float

Step size for finite differences. Default: 0.0 (machine precision).

factor : float

Initial step bound. Default: 100.0.

diag : ndarray, shape (n,) or None

Scaling factors for variables, float64.

Returns

x : ndarray, shape (n,)

Solution vector.

infodict : dict

Dictionary with keys: fvec (ndarray), nfev (int), fjac (ndarray), r (ndarray), qtf (ndarray). Only returned if full_output != 0.

info : int

Exit status. 1-4 indicate success.

Notes

If full_output is 0: returns (x, info) If full_output != 0: returns (x, infodict, info)

Aliases

  • scipy.optimize._minpack._hybrd