[SciPy-user] restricting optimize.leastsq to positive results

Christoph Rademacher rademacherchristoph@googlemail....
Tue Jul 31 08:25:59 CDT 2007


Hi all,

I am using optimize.leastsq to fit my experimental data. Is there a  
way to restrict the results to be a positive float?
e.g. my target function is a simple linear combination of three  
variables to fit
f(x) : return a*A(x) + b*B(x)

 From my experiment I know that a,b,A,B can only be positive floats.  
How do I put this extra information in optimize.leastsq?

Thanks for your help,

Christoph



More information about the SciPy-user mailing list