[SciPy-dev] Memory error in interpolate.sproot

Nils Wagner nwagner@iam.uni-stuttgart...
Mon Nov 10 08:15:45 CST 2008


Hi all,

I have some trouble concerning sproot

from numpy import linspace, sin
from scipy.interpolate import splrep, splev, sproot
from pylab import plot, show, legend, savefig
x = linspace(0, 10, 10)
y = sin(x)
tck = splrep(x, y)
x2 = linspace(0, 10, 200)
y2 = splev(x2, tck)
plot(x, y, 'o', x2, y2)
legend(('$\sin(x)$',r'Spline'))
show()
roots = sproot(tck, mest=2)


python -i test_interpol.py
/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/__init__.py:367: 
UserWarning: matplotlibrc text.usetex can not be used with 
*Agg backend unless dvipng-1.5 or later is installed on 
your system
   warnings.warn( 'matplotlibrc text.usetex can not be 
used with *Agg '
Traceback (most recent call last):
   File "test_interpol.py", line 12, in <module>
     roots = sproot(tck, mest=2)
   File 
"/data/home/nwagner/local/lib/python2.5/site-packages/scipy/interpolate/fitpack.py", 
line 576, in sproot
     z,ier=_fitpack._sproot(t,c,k,mest)
MemoryError

How can I resolve that problem ?

Nils


More information about the Scipy-dev mailing list