title: Fit a spline to using several y-value data sets using SciPy
body: <p>I'd like to generate a smoothed spline using a common set of x-values and three sets of y-values:</p>
  
  <pre><code>xs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  
  ys1 = [0.2, 0.3, 0.1, 0.8, 0.7, 0.2, 0.1, 0.8, 0.9, 1.1]
  ys2 = [0.1, 0.2, 0.4, 0.5, 0.8, 0.3, 0.2, 0.9, 1.2, 1.2]
  ys3 = [0.1, 0.1, 0.4, 0.1, 0.9, 0.3, 0.1, 0.8, 0.9, 0.9]
  </code></pre>
  
  <p>Looking at the spline documentation, I'm not sure if I am using the correct functions, but I'm trying to create my spline using <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RectBivariateSpline.html" rel="nofollow"><code>RectBivariateSpline</code></a>. What I'm trying to do is something like this, but I'm getting a number of errors, which makes me think I may be using the wrong function?</p>
  
  <pre><code>import scipy as scip
  from scipy.interpolate import RectBivariateSpline
  
  x_arr = scip.array(x_arr)
  y_arr = scip.vstack((ys1, ys2, ys3))
  spline = RectBivariate(x_arr, x_arr, y_arr)
  </code></pre>