[SciPy-User] Problems with optimize.leastsq and curve_fit

Pauli Virtanen pav@iki...
Tue Mar 19 14:56:36 CDT 2013

19.03.2013 21:47, Paul Hobson kirjoitti:
> I guess I don't quite understand how to use the functions properly since
> they're not returning meaningful results on what should be a pretty
> trivial linear fit. My initial thought is that they're being tripped up
> by my `x` variable not being uniformly spaced.

The problem is the use of float32 rather than float64. This is a bug,
which was fixed in 0.12.0.

Pauli Virtanen

More information about the SciPy-User mailing list