[SciPy-User] Interpolation in 3D with interp2d

denis denis-bz-gg@t-online...
Thu Aug 5 10:28:29 CDT 2010

Jana, Andreas,
  looking a little less hastily,
Jana's mail of 1 August imports griddata but doesn't call it ?

Do I understand that you want to
1) first griddata to get a A(f,z) on a uniform grid
2) then do bilinear interpolation from that ?
If so, why not just griddata() to your fine final grid in one shot ?

A gotcha, griddata() can return masked arrays which may mess up
downstream interpolation:
    print ma.count_masked( griddataresult )
(experts correct me / suggest what do do -- separate thread.)

(To do bilinear interpolation from one regular grid to another,
    from scipy.interpolate import RectBivariateSpline
    x, y = linspace(...), linspace(...)
    interpolator = RectBivariateSpline( x,y,z, kx=1, ky=1, s=0 )  #
s=0 interpolates
    xi, yi = linspace(...), linspace(...)
    zi = interpolator( xi, yi )

  -- denis

More information about the SciPy-User mailing list