title: Trying to understand scipy and numpy interpolation
body: <p>If I have some measured data whose function I don't know (let's say it's either not important, or computationally difficult), such as</p>
  
  <pre><code>x2 = [0, 1, 10, 25, 30]
  y2 = [5, 12, 50, 73, 23]
  </code></pre>
  
  <p>and I use <code>numpy.interp</code> to find the intermediate values, it gives me a linear interpolant between the points and I get a straight line:</p>
  
  <pre><code>xinterp = np.arange(31)
  yinterp1 = np.interp(xinterp, x2, y2)
  plt.scatter(xinterp, yinterp1)
  plt.plot(x2, y2, color = 'red', marker = '.')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lXh2s.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lXh2s.png" alt="enter image description here"></a></p>
  
  <p>The example from the <code>scipy.interpolate</code> docs gives</p>
  
  <pre><code>x = np.linspace(0, 10, num=11, endpoint=True)
  y = np.cos(-x**2/9.0)
  f = interp1d(x, y)
  f2 = interp1d(x, y, kind='cubic')
  xnew = np.linspace(0, 10, num=41, endpoint=True)
  plt.plot(x, y, 'o', xnew, f(xnew), '-', xnew, f2(xnew), '--')
  plt.legend(['data', 'linear', 'cubic'], loc='best')
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/g1xkd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/g1xkd.png" alt="enter image description here"></a></p>
  
  <p>with different <code>kind</code>s of interpolation for a smoother curve. But what if I want the <em>points</em> in a smooth curve, rather than just the curve? Is there a function in NumPy or SciPy that can give the discrete points along the smoothed curve?</p>