<div dir="ltr"><div>Just one small remark: in my experience many users utilize curve_fit to fit linear models (models that are linear in the fit parameters, e.g. f(x) = a * exp(-x) + b * exp(-x^2)). In this case the linear least squares problem can be solved uniquely without providing initial values for a and b. Even though curve_fit employs a general nonlinear least squares solver it should be able to find the global minimum for virtually all starting values (although I have not comprehensively tested it). On the other hand when the model is truly nonlinear the initial values of curve_fit fail with very high probability.<br></div><div><br></div><div>One may argue that using curve_fit for such cases is not the right choice. However, scipy does not provide a convenient interface such as curve_fit for linear models (as far as I know). And users who are not aware that a nonlinear least squares solver requires good initial values may also not be aware of the difference between linear and nonlinear models. (When I teach I regularly encounter the misconception that models that are nonlinear in the independent variable, e.g., x, require a nonlinear solver).</div><div><br></div><div>Long story short: when deprecating the initial choice for p0 it may be worthwile to also consider providing a convenient interface for lsq_linear that is similar to curve_fit and does not require initial values.</div><div><br></div><div>Cheers</div><div>Nils<br></div></div>