[SciPy-user] Intermittent fail of scipy.optimize.test

Matthew Brett matthew.brett at gmail.com
Wed Mar 22 14:39:40 CST 2006


Hi,

I am running into an odd problem that I have not seen before.  On two
systems, with current numpy and scipy svn, I am getting following
error:

import scipy.optimize
scipy.optimize.test()

....

======================================================================
ERROR: line-search Newton conjugate gradient optimization routine
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/scipy/optimize/tests/test_optimize.py",
line 104, in check_ncg
    full_output=False, disp=False, retall=False)
  File "/usr/lib/python2.4/site-packages/scipy/optimize/optimize.py",
line 986, in fmin_ncg
    alphak, fc, gc, old_fval = line_search_BFGS(f,xk,pk,gfk,old_fval)
  File "/usr/lib/python2.4/site-packages/scipy/optimize/optimize.py",
line 565, in line_search_BFGS
    phi_a2 = apply(f,(xk+alpha2*pk,)+args)
  File "/usr/lib/python2.4/site-packages/scipy/optimize/optimize.py",
line 130, in function_wrapper
    return function(x, *args)
  File "/usr/lib/python2.4/site-packages/scipy/optimize/tests/test_optimize.py",
line 31, in func
    raise RuntimeError, "too many iterations in optimization routine"
RuntimeError: too many iterations in optimization routine

This seems to occur randomly, about 3 times in ten runs of the test.



More information about the SciPy-user mailing list