[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 01:52:05 CDT 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

More information about the SciPy-user mailing list