[SciPy-user] optimize.fmin_bfgs only returning a scalar for xopt?

Nils Wagner nwagner@iam.uni-stuttgart...
Thu Apr 3 14:30:17 CDT 2008

On Thu, 3 Apr 2008 15:21:27 -0400
  David Warde-Farley <dwf@cs.toronto.edu> wrote:
> Hi folks,
> I just checked out a fresh copy of scipy this morning 
>and I'm having  
> an odd problem with optimize.fmin_bfgs (and actually 
>fmin_cg too).
> Namely, the function I give it (and the initial guess) 
>use 1d-array  
> arguments of length > 1, but I only get a scalar back 
>(specifically a  
> numpy.float64) in the first tuple position, which, if 
>I'm reading the  
> docs right, should contain the value of x that minimizes 
>the function  
> you provided.
> This happens whether or not I supply a gradient 
>Furthermore, my objective function actually raises an 
>exception if  
> it's called with a scalar arg instead of an array of the 
>right length.
> Is this a bug? Can anyone confirm this behaviour in 
>r4076? Or am I  
> doing it wrong?
> Thanks,
> David
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user

Can you provide us with your example code ?


More information about the SciPy-user mailing list