[SciPy-user] scipy.interpolate.Rbf() MemoryError for more than 4000 (x, y) pairs ?

Jim Vickroy Jim.Vickroy at noaa.gov
Fri Apr 3 11:40:49 EDT 2009


Hello Group,

I'm a radial basis functions novice so I may be making a mistake; 
however, it seems that scipy.interpolate.Rbf() can handle a maximum of 
~4000 (x,y) points.  Is that correct?

Here is a sample output from the attached script (rbf-demo.py) for 5000 
(x,y) points:

<output>
DOS>rbf-demo.py
Python version: 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 
bit (Intel)]
numpy version:  1.2.1
scipy version:  0.7.0
multiquadric         in-painting required 200 seconds for 5000 points
Traceback (most recent call last):
 File "rbf-demo.py", line 28, in <module>
   rbf   = scipy.interpolate.Rbf(x, y, z, function=function)
 File "C:\Python25\lib\site-packages\scipy\interpolate\rbf.py", line 
132, in __init__
   r = self._call_norm(self.xi, self.xi)
 File "C:\Python25\lib\site-packages\scipy\interpolate\rbf.py", line 
147, in _call_norm
   return self.norm(x1, x2)
 File "C:\Python25\lib\site-packages\scipy\interpolate\rbf.py", line 
100, in _euclidean_norm
   return sqrt( ((x1 - x2)**2).sum(axis=0) )
MemoryError

DOS>
</output>

Thanks,
-- jv

P.S.
I'm considering using Rbf to replace a horizontal band of bad-pixel 
values in 512x512 images obtained from a damaged detector.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rbf-demo.py
Type: application/x-python
Size: 1436 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090403/320765c6/attachment.bin>


More information about the SciPy-User mailing list