Hi is it possible in numpy or scipy to fit a 2D data of the type z= f(x,y) to a chebyschev polynomial in 2D ? In other words I have a x[i], y[i], z[i] defined over a rectangular meshgrid. I want to fit z[i] to 2d Chebyschev polynomial over (x, y) and get the fitted values of z at x[i], y[i]?
Say for example we have
x= np.linspace (0, 15, 30)
y = np.linspace (0, 15, 30)
point_list = list(itertools.product(x,y))
Z = np.random.uniform(0, 1, len(point_list))
I want to fit Z = sum_j T_j(x,y)
where T_j(x,y)
are 2D chebyschev polynomials
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…