There is a statement in the manual of curve_fit
that
The model function, f(x, ...). It must take the independent variable as the first argument and the parameters to fit as separate remaining arguments.
However, I would like to use as a model function a method of the class which is defined as:
def model_fun(self,x,par):
So, the first argument is not an independent variable, as you can see. Is there any way how I can use the method of a class as a model function for curve_fit