[SciPy-user] scipy.interpolate.bisplrep MemoryError

Pauli Virtanen pav@iki...
Mon Apr 27 15:46:56 CDT 2009


Mon, 27 Apr 2009 10:59:28 -0700, n.l.o wrote:
> I am trying to interpolate a 512x512 floating-point array with
> scipy.interpolate.bisplrep and bisplev.
[clip]
> x,y = mgrid[0:SIZE_X, 0:SIZE_Y]
> tck = interpolate.bisplrep(x,y,a90)
> xnew = x - dx90
> ynew = x - dy90
> a90new = interpolate.bisplev(xnew,ynew,tck)
> 
> BUT at tck = interpolate.bisplrep(x,y,a90) i get:
[clip]
> MemoryError:
> WARNING: Failure executing file: <reduce.py>
> 
> What can I do to make it work?

Try using the interpolation tools from ndimage, or RectBivariateSpline, 
instead; your data is on a regular grid so specialized algorithms should 
be used.

-- 
Pauli Virtanen



More information about the SciPy-user mailing list