[SciPy-user] Curve fitting and LaTeX output

Rob Clewley rob.clewley@gmail....
Thu Aug 28 08:30:59 CDT 2008


> def mycost(c):
>    y_model = c[0] + c[1]**x
>    error_vect = y - y_model
>    return sum(error_vect**2)
>

FWIW norm(errorvect) will probably be faster than explicit summing and squaring.


More information about the SciPy-user mailing list