It\'s easy to resample an array like
a = numpy.array([1,2,3,4,5,6,7,8,9,10])
with an integer resampling factor. For instance, wi
Since you mention this being data from an audio .WAV file, you might look at scipy.signal.resample.
Resample
xtonumsamples using Fourier method along the given axis.The resampled signal starts at the same value as
xbut is sampled with a spacing oflen(x) / num * (spacing of x). Because a Fourier method is used, the signal is assumed to be periodic.
Your linear array a is not a good one to test this on, since it isn't periodic in appearance. But consider sin data:
x=np.arange(10)
y=np.sin(x)
y1, x1 =signal.resample(y,15,x) # 10 pts resampled at 15
compare these with either
y1-np.sin(x1) # or
plot(x, y, x1, y1)