[Numpy-discussion] Rolling window (moving average, moving std, and more)

Erik Rigtorp erik at rigtorp.com
Mon Jan 3 10:41:11 EST 2011


On Mon, Jan 3, 2011 at 10:36, Keith Goodman <kwgoodman at gmail.com> wrote:
> On Mon, Jan 3, 2011 at 5:37 AM, Erik Rigtorp <erik at rigtorp.com> wrote:
>
>> It's only a view of the array, no copying is done. Though some
>> operations like np.std()  will copy the array, but that's more of a
>> bug. In general It's hard to imagine any speedup gains by copying a
>> 10GB array.
>
> I don't think that np.std makes a copy of the input data if the input
> is an array. If the input is, for example, a list, then an array is
> created.

When I tried it on a big array, it tried to allocate a huge amount of
memory. As I said it's probably a bug.



More information about the NumPy-Discussion mailing list