[SciPy-User] bug in optimize.curve_fit ?

josef.pktd at gmail.com josef.pktd at gmail.com
Fri Aug 5 05:14:13 EDT 2011


On Fri, Aug 5, 2011 at 4:54 AM, Pauli Virtanen <pav at iki.fi> wrote:
> Thu, 04 Aug 2011 16:17:07 +0200, Xavier Gnata wrote:
> [clip]
>> def func(x, a, b, c):
>>     return a*np.exp(-b*x) + c
>> x = list(np.linspace(0,4,50))
>> y = func(x, 2.5, 1.3, 0.5)
>
> Your program fails already here -- before curve_fit.

Good catch, I had spent 10 minutes looking for the bug in my version
without ever checking the line number of the exception.

Josef

>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list