[SciPy-user] interp2d raises AttributeError: interp2d instance has no attribute 'tck', scipy 0.4.8, numpy 0.9.6

Pau Gargallo pau.gargallo at gmail.com
Thu Apr 13 03:36:02 CDT 2006


as far as i know, interp2d is not implemented.
There is some skeleton code, but is not finished. See
http://projects.scipy.org/scipy/scipy/browser/trunk/Lib/interpolate/interpolate.py

i have a pure python implementation of interpn that may be useful for you at
http://www.scipy.org/PauGargallo/Interpolation
it is probably very buggy, but seems to work.

if you want more sophisticated, accurate or fast interpolation you
will have to use the fitpack wrappings directly.

Are there any plans for reviewing the interpolate package?
Something like the 'interpolation review week'?

pau



On 4/13/06, Albert Huang <albert at csail.mit.edu> wrote:
> Hi,
>
> The following program raises an AttributeError
>
> file: testinterp2d.py
> ====
> from scipy.interpolate.interpolate import interp2d
> from numpy import *
>
> X, Y = mgrid[0:3, 0:3]
> Z = X * Y
> ip = interp2d( X, Y, Z )
> ip( 0.5, 0.5 )
>
>
> ====
> # python testinterp2d.py
> Traceback (most recent call last):
>   File "testinterp2d.py", line 9, in ?
>     ip( 0.5, 0.5 )
>   File
> "/home/albert/local/lib/python2.4/site-packages/scipy/interpolate/interpolate.py",
> line 64, in __call__
>     z,ier=fitpack._fitpack._bispev(*(self.tck+[x,y,dx,dy]))
> AttributeError: interp2d instance has no attribute 'tck'
>
> ====
> This is on scipy 0.4.8, numpy 0.9.6, Ubuntu 5.10, python 2.4
>
> Am I not using interp2d correctly?
>
> Thanks,
> -albert
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
>
>



More information about the SciPy-user mailing list