[SciPy-user] scipy.interpolate.bisplrep MemoryError

n.l.o magnusp@astro.su...
Mon Apr 27 12:59:28 CDT 2009

I am trying to interpolate a 512x512 floating-point array with
scipy.interpolate.bisplrep and bisplev. 

First some info about the variables:

SIZE_X=SIZE_Y=512, a90.shape=(512,512)
dx90 and dy90 are sub-pixel,i.e floating-point shifts

Then the code:
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:

MemoryError                               Traceback (most recent call last)

/home/magnusp/msc/reduction/reduce.py in <module>()
    658 x,y = mgrid[0:SIZE_X, 0:SIZE_Y]
--> 659 tck = interpolate.bisplrep(x,y,a90)
    660 xnew = x - dx90
    661 ynew = x - dy90

/usr/lib/python2.6/dist-packages/scipy/interpolate/fitpack.py in bisplrep(x,
y, z, w, xb, xe, yb, ye, kx, ky, task, s, eps, tx, ty, full_output, nxest,
nyest, quiet)
    760     except OverflowError:
    761         raise OverflowError("Too many data points to interpolate")
--> 762     tx,ty,c,o =
    764     _curfit_cache['tx']=tx

WARNING: Failure executing file: <reduce.py>

What can I do to make it work?


View this message in context: http://www.nabble.com/scipy.interpolate.bisplrep-MemoryError-tp23261686p23261686.html
Sent from the Scipy-User mailing list archive at Nabble.com.

More information about the SciPy-user mailing list