[SciPy-user] optimize.fmin_cg

Mathias Wagner mathias.wagner@physik.tu-darmstadt...
Tue Mar 6 08:20:12 CST 2007


Hi,

I use optimize.fmin_cg to find the minimum of 1-dimensional and n-dimensional 
functions.

For 1-dimensional functions everything is fine, but for n-dimensional 
functions I get a strange result.

The function returns an array-of-array-of-arry depending on the number of 
iterations, for example I get 

In [6]:scipy.optimize.fmin_ncg(a.potstmu, [60.0] , 
a.grad_potstmu,args=(10,0,0),disp=1)
Optimization terminated successfully.
         Current function value: -3464534650.284432
         Iterations: 3
         Function evaluations: 51
         Gradient evaluations: 9
         Hessian evaluations: 0
Out[6]:array([[[[[[[[[[[ 121.31834513]]]]]]]]]]])


The function potstmu is quite complicated, I am still searching for an easier 
example which needs more than 1 iteration.
Can anyone confirm this behavior?
Or is it a problem with my function?


Mathias


More information about the SciPy-user mailing list