[SciPy-user] problem using interp2d

Stefan van der Walt stefan at sun.ac.za
Wed Aug 24 06:39:46 CDT 2005


Hi,

I am trying to use scipy.interpolate.interpolate.interp2d (why the
double interpolate?) like this:

----
from scipy.interpolate.interpolate import interp2d
from Numeric import *

z = repeat([arange(3.0)], 3)

i = interp2d(arange(3), arange(3), z, kind='linear')

print i(0.5, 0.5)
----

I see the following error message

Traceback (most recent call last):
  File "interp.py", line 8, in ?
    print i(0.5, 0.5)
  File "/usr/lib/python2.3/site-packages/scipy/interpolate/interpolate.py", line 79, in __call__
    z,ier=fitpack._fitpack._bispev(*(self.tck+[x,y,dx,dy]))
AttributeError: interp2d instance has no attribute 'tck'


Has anyone else seen this behaviour?  Can someone please check whether
it is fixed in the latest SVN version (I am using scipy version 0.3.2
as packaged by Debian).

Thanks
Stéfan



More information about the SciPy-user mailing list