[SciPy-user] scipy.optimise.lbfgsb /bounded optimization help

Robert Kern robert.kern at gmail.com
Sun Jan 28 15:36:31 CST 2007

mclaugb wrote:
> If passed as a tuple, the error of my previous post occurs.
> "Value Error:  Setting an array element with a sequence"  The line of code 
> tries to add a tuple to ndarrays. 

No, it doesn't. It adds a tuple to a tuple.


(xk+ei,) is a tuple. args is a tuple.

> Should something be modified?

It appears that the RHS of that assignment is an array, not a scalar. Permmin()
must return a scalar. That is where the exception is coming from.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list