title: Get the formula of a interpolation function created by scipy
body: <p>I have done some work in Python, but I'm new to <code>scipy</code>. I'm trying to use the methods from the <code>interpolate</code> library to come up with a function that will approximate a set of data.</p>
  
  <p>I've looked up some examples to get started, and could get the sample code below working in <a href="http://www.pythonxy.com/" rel="noreferrer">Python(x,y)</a>:</p>
  
  <pre><code>import numpy as np
  from scipy.interpolate import interp1d, Rbf
  import pylab as P
  
  # show the plot (empty for now)
  P.clf()
  P.show()
  
  # generate random input data
  original_data = np.linspace(0, 1, 10)
  
  # random noise to be added to the data
  noise = (np.random.random(10)*2 - 1) * 1e-1
  
  # calculate f(x)=sin(2*PI*x)+noise
  f_original_data = np.sin(2 * np.pi * original_data) + noise
  
  # create interpolator
  rbf_interp = Rbf(original_data, f_original_data, function='gaussian')
  
  # Create new sample data (for input), calculate f(x) 
  #using different interpolation methods
  new_sample_data = np.linspace(0, 1, 50)
  rbf_new_sample_data    = rbf_interp(new_sample_data)
  
  # draw all results to compare
  P.plot(original_data, f_original_data, 'o', ms=6, label='f_original_data')
  P.plot(new_sample_data, rbf_new_sample_data, label='Rbf interp')
  P.legend()
  </code></pre>
  
  <p>The plot is displayed as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/b0ve4.png" alt="interpolation-plot"></p>
  
  <p>Now, is there any way to get a polynomial expression representing the interpolated function created by <code>Rbf</code> (i.e. the method created as <code>rbf_interp</code>)?</p>
  
  <p>Or, if this is not possible with <code>Rbf</code>, any suggestions using a different interpolation method, another library, or even a different tool are also welcome.</p>