{ } Raw JSON

bundles / scipy 1.17.1 / scipy / optimize / _nonlin / DiagBroyden

class

scipy.optimize._nonlin:DiagBroyden

source: /scipy/optimize/_nonlin.py :1189

Signature

class   DiagBroyden ( alpha = None )

Members

Summary

Find a root of a function, using diagonal Broyden Jacobian approximation.

Extended Summary

The Jacobian approximation is derived from previous iterations, by retaining only the diagonal of Broyden matrices.

Parameters

%(params_basic)s
alpha : float, optional

Initial guess for the Jacobian is (-1/alpha).

%(params_extra)s

Examples

The following functions define a system of nonlinear equations
def fun(x):
    return [x[0]  + 0.5 * (x[0] - x[1])**3 - 1.0,
            0.5 * (x[1] - x[0])**3 + x[1]]
A solution can be obtained as follows.
from scipy import optimize
sol = optimize.diagbroyden(fun, [0, 0])
sol

See also

root

Interface to root finding algorithms for multivariate functions. See method='diagbroyden' in particular.

Aliases

  • scipy.optimize._nonlin.DiagBroyden