[SciPy-user] newscipy interp1d

Christian Kristukat ckkart at hoc.net
Sat Dec 10 12:38:27 CST 2005


Hi,
I get errors when using scipy.interpolate.interp1d from newscipy like the following:

x=linspace(-1,4,20)
y=x**2
ip=interp1e(x,y)
xn=linspace(-.5,1,200)
yn=ip(xn)

Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/usr/lib/python2.4/site-packages/scipy/interpolate/interpolate.py", 
line 180, in __call__
     putmask(y_new, new_out.ravel(), self.fill_value)
   File "/usr/lib/python2.4/site-packages/scipy/base/oldnumeric.py", line 187, 
in putmask
     return a.putmask(v, mask)
TypeError: array cannot be safely cast to required type

I guess this a bug.?

Regards, Christian



More information about the SciPy-user mailing list