In []: from scipy.interpolate import interp1d
In []: x, y= randn(n), linspace(0, 1, n)
In []: x.sort()
In []: plot(x, y, lw= 2)
Out[]: [<matplotlib.lines.Line2D object at 0x12E190D0>]
In []: f= interp1d(x, y, 'cubic')
In []: xi= linspace(x.min(), x.max(), n)
In []: plot(xi, f(xi))
Out[]: [<matplotlib.lines.Line2D object at 0x12E20830>]