Hello,
I am trying to use and understand the scipy.optimize.curve_fit() function. In particular, I wanted to pass a function with packed parameter (general polynoms). Along the way, I made a simple example which seems to show that it doesn't work as expected. It is very likely that I am missing something, and any help is welcome !
The working example can be found
here. One possibly important note is that the not-working function is not vectorized, namely f(a, *p) != [f(val, *p) for val in a], if a is a numpy array.
Many thanks for your help,
Cheers,
Romain