'module' object has no attribute 'interpld'

I'm fresh on python,using python2.7,and got some questions on the code blew:

import numpy as np
from scipy import interpolate
import pylab as py

x=np.r_[0:10:11j]
y=np.sin(x)
xnew=np.r_[0:10:100j]

#f=interpolate.interpld(x,y)


py.figure(1)
py.clf()
py.plot(x,y,'ro')
for kind in ['nearest','zero','slinear','quadtatic','cublic']:
    f=interpolate.interpld(x,y,kind=kind)
    ynew=f(xnew)
    py.plot(xnew,ynew,label=kind)
py.legend(loc='lower right')

but it resulted in:

Traceback (most recent call last):
  File "C:\Users\LCL\.xy\startups\python_web\my_first_try_on_python_web\python_Interpolation\example1.py", line 22, in <module>
    f=interpolate.interpld(x,y,kind=kind)
AttributeError: 'module' object has no attribute 'interpld'

You used interpld, i.e. INTERPLD.

You want interp1d, i.e. with the numeral 1, for one-dimensional.


It looks like you are using interpolate.interpld but the function name is interpolate.interp1d (with a number one instead of a letter L).


It should be "interp1d",the number 1,not L