Is there a way to interpolate from a table with data in scipy?
<p>My question is the following. I have a code that computes, for a given x, a value of a function f(x). However since f(x) is a bit too large and complicated, and the program has to go through a very large dataset (x) at different timesteps, is not really efficient. I was wondering if there is a function maybe in scipy, so that I can create a table with different already computed values for f(x), something like save in a file "function.txt" a table like (of course in my case the table will be larger going from values 1e0, 1e8):</p>

<pre><code>x    f(x)
1     1 
2     4 
3     9
4     16 
5     25 
</code></pre>

<p>And then somehow use an interpolation, such that if my program reads that x = 2.2 it can estimate the value f(x) from the already calculated values in the table. </p>