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