bundles / scipy latest / scipy / optimize / _dcsrch / DCSRCH / _iterate
function
scipy.optimize._dcsrch:DCSRCH._iterate
source: build-install/usr/lib/python3.14/site-packages/scipy/optimize/_dcsrch.py:269
Signature
def _iterate(self, stp, f, g, task)Parameters
stp: floatThe current estimate of a satisfactory step. On initial entry, a positive initial estimate must be provided.
f: floatOn first call f is the value of the function at 0. On subsequent entries f should be the value of the function at stp.
g: floatOn initial entry g is the derivative of the function at 0. On subsequent entries g is the derivative of the function at stp.
task: bytesOn initial entry task must be set to 'START'.
On exit with convergence, a warning or an error, thevariable task contains additional information.
Returns
: stp, f, g, task: tuplestp
the current estimate of a satisfactory step if task = 'FG'. If task = 'CONV' then stp satisfies the sufficient decrease and curvature condition.
f
the value of the function at stp.
g
the derivative of the function at stp.
task
On exit task indicates the required action:
If task(1:2) == b'FG' then evaluate the function and derivative at stp and call dcsrch again.
If task(1:4) == b'CONV' then the search is successful.
If task(1:4) == b'WARN' then the subroutine is not able to satisfy the convergence conditions. The exit value of stp contains the best point found during the search.
If task(1:5) == b'ERROR' then there is an error in the input arguments.
Aliases
scipy.optimize._dcsrch.DCSRCH._iterate