[SciPy-User] resample and aggregate a numpy array
Pietro
peter.zamb at gmail.com
Thu Mar 27 05:34:20 EDT 2014
Hi Davide,
On Thu, Mar 27, 2014 at 7:52 AM, Davide Lasagna <lasagnadavide at gmail.com> wrote:
> I do not fully understand what is going on in your code. However, I remember
> doing something like that a few months ago, and I used numpy stride tricks
> to "virtually reshape" a 1d array into a 2d array with elements repeating
> along the rows. Then I could easily apply function over the rows of it, (for
> instance moving average).
>
> To start see this link:
>
> http://scipy-lectures.github.io/advanced/advanced_numpy/#indexing-scheme-strides
Wow, I didn't know this thing of the numpy arrays, certainly I will
look into it.
But at least it seems that a function like this does not already exist
in the numpy/scipy library.
Thanks for the tip!
Pietro
More information about the SciPy-User
mailing list