[SciPy-user] cspline1d_eval
George Geller
george_geller at speakeasy.net
Mon Mar 13 20:12:13 CST 2006
I was trying to follow the recipe at:
http://www.scipy.org/Cookbook/Interpolation
from numpy import r_, sin
from scipy.signal import cspline1d, cspline1d_eval
x = r_[0:10]
dx = x[1]-x[0]
newx = r_[-3:13:0.1] # notice outside the original domain
y = sin(x)
cj = cspline1d(y)
newy = cspline1d_eval(cj, newx, dx=dx,x0=x[0])
from pylab import plot
plot(newx, newy, x, y, 'o')
First, with my installation the first import line has to read:
from scipy import r_, sin
Second, the cspline1d_eval function seems to no longer be part of
scipy.signal:
ggeller at hayes:~$ python
Python 2.4.2 (#2, Sep 30 2005, 21:19:01)
[GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.signal import cspline1d_eval
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: cannot import name cspline1d_eval
Am I doing something really dumb, or is the recipe seriously obsolete?
George
More information about the SciPy-user
mailing list