0

I have the following text file:

82 83.2 92.5
89 90 100

These numbers represent experimental data having the shape z=f(x,y), where x are the numbers from the leftmost column, y are the numbers from the middle column and z are the numbers from the rightmost column. The file has more experimental data points, but those two are enough for this example.

I am trying to interpolate the data above but I cannot seem to find an appropriate way. Most scipy interpolation methods give as example data that are on grids or meshgrids and interp2d, if I understood correctly, needs a little preprocessing before the data is fed to the function.

Is there any way to get my interpolation without such preprocessing? Ideally would be simply by reading the data into loadtxt, doing some slicing to separate the inputs and the outputs and then pass them to the interpolation function?

Bogdan Doicin
  • 2,342
  • 5
  • 25
  • 34

0 Answers0