[SciPy-user] Curve fitting and LaTeX output

Rob Clewley rob.clewley at gmail.com
Thu Aug 28 09:30:59 EDT 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