The key reason for writing a new Scipy least_squares function is to provide upper and lower bounds on variables (also called "window constraints"). This was the requested feature.
This, apparently, a simple addition is actually far from trivial and requires completely new algorithms, in particular, dogleg ( method="dogleg" least_squares ) and reflective areas of trust ( method="trf" ), which provide reliable and efficient treatment (details about the algorithms are given in the links to the corresponding Scipy documentation ).
Support for large-scale problems and rare Jacobians is also important.
If the boundaries of the variables are not needed, and the problem is not very large, the algorithms in the new Scipy least_squares function have a small, if at all possible, advantage with respect to the Levenberg-Marquardt MINPACK implementation used in the old leastsq alone.
However, the same Fortran MINPACK code is called by both the old leastsq and the new least_squares with the option method="lm" . For this reason, the old leastsq now deprecated and not recommended for new code.
divenex
source share