Error in 2D interpolation
I am getting errors using interpolate.bisplrep function. I've followed the scipy tutorial on 2D interpolation (page 23) and have the following piece of code: . . . old_x, old_y = N.mgrid[boundries[2]:boundries[3]:1j*mat.shape[0], boundries[0]:boundries[2]:1j*mat.shape[1]] print old_x.shape, old_y.shape, mat.shape tck = interpolate.bisplrep(old_x, old_y, mat, s=0) . . . generates the following error: (59, 127) (59, 127) (59, 127) # <== The output of the above print statement iopt,kx,ky,m= 0 3 3 7493 nxest,nyest,nmax= 152 152 152 lwrk1,lwrk2,kwrk= 22908510 13011569 28518 xb,xe,yb,ye= 0.000182 0.011776 0.002325 0.000182 eps,s 1.E-16 0. Traceback (most recent call last): File "process_mats.py", line 81, in ? interpolated = same_grid_interpolation(expanded, boundries, coord, 0.00008) File "process_mats.py", line 68, in same_grid_interpolation tck = interpolate.bisplrep(old_x, old_y, mat, s=0) File "/usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack.py", line 611, in bisplrep tx,ty,nxest,nyest,wrk,lwrk1,lwrk2) SystemError: error return without exception set System: Dual P4 PC + 512MB Gentoo linux (kernel 2.6.9) Python 2.4.1 scipy version 0.3.2_300.4521 Numeric 24.0 In another system I get MemoryError exception in the same place. The system is P3 + 192MB Gentoo linux (Kernel 2.4.20) Python 2.4.1 Numeric 23.7 Latest scipy from CVS. Any ideas? Nadav.
participants (1)
-
Nadav Horesh