Can I interpolate if I don't know the function I am dealing with? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Can I interpolate if I don't know the function I am dealing with? (/thread-24090.html) |
Can I interpolate if I don't know the function I am dealing with? - player1681 - Jan-30-2020 Hello everyone. I am working on the translation of some code from mathematica to python. In one line it is written ifuncEPSX = Interpolation[windXMat //. {x_List} :> x]; here x_List is a matrix of three columns, the two first are X and Y points in a plane and the third are the values of the function. I have constructed a similar matrix in python. However, I don't know how to reproduce the aforementined line of code, since in the interpolations defined for numpy and scipy it seems like the function of X and Y has to be known. Is there a way to do this in python? Any answer is appreciated. Regards. RE: Can I interpolate if I don't know the function I am dealing with? - buran - Jan-30-2020 maybe https://docs.scipy.org/doc/numpy/reference/generated/numpy.polyfit.html and https://docs.scipy.org/doc/numpy/reference/generated/numpy.polynomial.polynomial.Polynomial.fit.html#numpy.polynomial.polynomial.Polynomial.fit RE: Can I interpolate if I don't know the function I am dealing with? - player1681 - Jan-30-2020 Yes, I think this might be useful. Thank you very much. |