[SciPy-user] error at optimize.fmin
Wed Jun 18 08:54:08 CDT 2008
On Wed, Jun 18, 2008 at 02:08:09PM +0200, Sebastian Stephan Berg wrote:
> very simple little error ;). Python will see (H0) as H0 and not a tuple
> with the list as element. Using args=(H0,) should fix it.
There is more to it. You'll find another puzzling error once you fix this
one. If you read carefully the docs to optimize.fmin_l_bfgs_b, you can
see that if you do not specify the gradient of the function, fprime, func
should return two arguments: the value of the function you want to
optimize, and the gradient. If you don't want this behavior, you should
set "approx_grad" to true.
More information about the SciPy-user