[SciPy-User] sinc interpolation

Travis Oliphant oliphant@enthought....
Thu Nov 26 10:42:44 CST 2009


On Nov 25, 2009, at 10:16 AM, Giovanni Marco Dall'Olio wrote:

>
>
> On Wed, Nov 25, 2009 at 3:48 PM, Travis Oliphant <oliphant@enthought.com 
> > wrote:
>
>
> 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]
>
> just a question, why don't you use  numpy.linspace(0, 10, 101) ?

I do quite often (especially in module code),  but r_ is less typing  
and I like the use of slice syntax to specify endpoints.

-Travis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20091126/d71e63d5/attachment.html 


More information about the SciPy-User mailing list