[SciPy-user] Spline interpolation on unevenly spaced grid.

Nadav Horesh nadavh at visionsense.com
Sun Apr 25 03:28:09 CDT 2004

I am trying to do spline interpolation on arbitrary 2D grids. I followed the tutorial example (p. 22), but it seems to work only on regular grids:

>>> from scipy import *
>>> from scipy import interpolate as SI
>>> x,y = mgrid[-1:1:15j,-1:1:15j]
>>> xx = x**1.2
>>> z = exp(-4*(x**2+y**2))
>>> tck = SI.bisplrep(x,y,z)
/usr/local/lib/python2.3/site-packages/scipy/interpolate/fitpack.py:611: DeprecationWarning: integer argument expected, got float
>>> tck = SI.bisplrep(x,y,z)
>>> tck = SI.bisplrep(xx,y,z)

>>> ================================ RESTART ================================
**** This is a seg fault

1. Can someone explain the warning message?
2. Is there a method in scipy to do spline interpolation on arbitrary grids?

(scipy version: 0.3.0_266.4239)


More information about the SciPy-user mailing list