is it possible (in Python) to define a polynomial type of function that has changing amount of parameters? Number of parameters should change according to number of data series that I have in my input file.
Currently I have something like this:
def y(x, a0, x2, x3, x4):
y = a0 + a1*x + a2*x**2 + a3*x**3
return y
I could of course set parameters of higher order to zero by extra parameter but would there be some better way.