[SciPy-dev] Trouble with optimize.fmin_ncg
Wed Jul 25 04:55:59 CDT 2007
Nils Wagner wrote:
> Matthieu Brucher wrote:
>> Here is a link to the diff :
> Since the other optimizers are not affected, we may cut it down to
> Is it possible that
I have missed one bracket
fun(*(x,) +args) instead of fun(*((x,) +args))
(and now I fixed it, lines 1481, 1482,1027)
however, seems like it work without additional brackets as well:
>>> f = lambda x,y,z,t: x+y+z+t
But since your funcs take no additional arguments (only x is present),
it's not the matter.
I checked - the problem remains.
I took a look at other changes and still can't find what's the problem.
[A,B] = numpy.dot([[dc**2, -db**2],[-dc**3,
309 d1 = empty((2,2))
310 d1[0,0] = dc**2
311 d1[0,1] = -db**2
312 d1[1,0] = -dc**3
313 d1[1,1] = db**3
314 [A,B] =
are not related to the problem, because my debugger don't reach a
breakpoint placed here.
711 rhok = 1 / (numpy.dot(yk,sk))
712 except ZeroDivisionError:
713 rhok = 1000.
715 try: # this was handled in numeric, let it remaines for
716 rhok = 1.0 / (numpy.dot(yk,sk))
717 except ZeroDivisionError:
718 rhok = 1000.0
719 print "Divide-by-zero encountered: rhok assumed large"
720 if isinf(rhok): # this is patch for numpy
721 rhok = 1000.0
are related to fmin_bfgs code.
> are responsible for the trouble with ncg ?
> Scipy-dev mailing list
More information about the Scipy-dev