[SciPy-user] Generating tuples and lists connected with optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1)

Nils Wagner nwagner at mecha.uni-stuttgart.de
Fri Jul 1 02:52:05 EDT 2005


Hi all,

Sorry for this inquiry but how can I initialize the list "bounds" and 
the tuple "guess" more efficiently ?
The entries in bounds are identical for each design variable, while the 
initial guess consists of two different values.
So how can I benefit from this pattern in building "bounds" and "guess" 
for 2n design variables ?

bounds = [(0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0)]
guess = 2.0,2.0,2.0,1.0,1.0,1.0

A small example would be appreciated.

Thanks in advance
                                         Nils




More information about the SciPy-User mailing list