[SciPy-user] optimize.fmin_bfgs only returning a scalar for xopt?
David Warde-Farley
dwf at cs.toronto.edu
Thu Apr 3 15:21:27 EDT 2008
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 function.
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
More information about the SciPy-User
mailing list