A Python implementation of R's nonlinear regression function nls from the stats package.