[SciPy-user] convergence detection in optimize/nonlin.py
Wed Nov 12 17:29:24 CST 2008
I am experimenting with optimize.broyden3() for solving a multivariable,
nonlinear problem. The signature is
def broyden3(F, xin, iter=10, alpha=0.4, verbose = False)
and it is written to iterate exactly 'iter' times.
However, after it converges (to within machine tolerances) it runs into
division by zero errors and fails while trying to take the square root
of a NaN. I have modified my copy as follows.
Original (revision 5067), beginning on line 151:
Modified version, beginning on line 151
normDelta = norm(deltaFxm)
if normDelta == 0.0:
All of the routines in optimize/nonlin.py have the same behaviour. Could
we add some convergence checking to each of them? Should 'iter' be
called 'maxiter' to reflect this?
More information about the SciPy-user