[SciPy-User] sinc interpolation

Travis Oliphant oliphant@enthought....
Wed Nov 25 08:48:09 CST 2009

On Nov 20, 2009, at 2:26 PM, David Trem wrote:

> Hello,
> Is sinc interpolation available in Scipy ?

Yes, use scipy.signal.resample  which uses a Fourier method to  
downsample or upsample a signal:

from scipy.signal import resample
from numpy import r_, sin
from pylab import plot

x = r_[0:10]
y = sin(x)
yy = resample(x, 100)

# This is a bit tricky to get the x-samples right
xx = r_[0:10:101j][:-1]

plot(x,y,'ro', xx, yy)


More information about the SciPy-User mailing list