Fitting a spectra of gaussians

It is determined by the input x, as the function evaluates on x_1, x_2,…, x_n

You are right there is no good collection of examples dedicated to fitting non-linear functions. I put up a small Gist you might find helpful: Nonlinear_funcs.ipynb · GitHub