Re: [Numpy-discussion] numpy ring buffer

2013-05-06 Thread Robert Kern
On Mon, May 6, 2013 at 10:52 AM, Daniele Nicolodi wrote: > On 06/05/2013 11:39, Daniele Nicolodi wrote: >> On 06/05/2013 11:01, Robert Kern wrote: >>> np.roll() copies all of the data every time. It does not return a >>> view. >> >> Are you sure about that? Either I'm missing something, or it ret

Re: [Numpy-discussion] numpy ring buffer

2013-05-06 Thread Robert Kern
On Mon, May 6, 2013 at 10:39 AM, Daniele Nicolodi wrote: > On 06/05/2013 11:01, Robert Kern wrote: >> np.roll() copies all of the data every time. It does not return a >> view. > > Are you sure about that? Either I'm missing something, or it returns a > view in my testing (with a fairly old numpy

Re: [Numpy-discussion] numpy ring buffer

2013-05-06 Thread Daniele Nicolodi
On 06/05/2013 11:39, Daniele Nicolodi wrote: > On 06/05/2013 11:01, Robert Kern wrote: >> np.roll() copies all of the data every time. It does not return a >> view. > > Are you sure about that? Either I'm missing something, or it returns a > view in my testing (with a fairly old numpy, though):

Re: [Numpy-discussion] numpy ring buffer

2013-05-06 Thread Sebastian Berg
On Mon, 2013-05-06 at 11:39 +0200, Daniele Nicolodi wrote: > On 06/05/2013 11:01, Robert Kern wrote: > > np.roll() copies all of the data every time. It does not return a > > view. > > Are you sure about that? Either I'm missing something, or it returns a > view in my testing (with a fairly old n

Re: [Numpy-discussion] numpy ring buffer

2013-05-06 Thread Daniele Nicolodi
On 06/05/2013 11:01, Robert Kern wrote: > np.roll() copies all of the data every time. It does not return a > view. Are you sure about that? Either I'm missing something, or it returns a view in my testing (with a fairly old numpy, though): In [209]: np.__version__ Out[209]: '1.6.2' In [210]: v

Re: [Numpy-discussion] numpy ring buffer

2013-05-06 Thread Robert Kern
On Mon, May 6, 2013 at 9:51 AM, Daniele Nicolodi wrote: > Hello, > > numpy arrays are great for interfacing python with libraries that expect > continuous memory buffers for data passing. However, libraries > interfacing to data acquisition hardware often use those buffers as ring > buffers where

[Numpy-discussion] numpy ring buffer

2013-05-06 Thread Daniele Nicolodi
Hello, numpy arrays are great for interfacing python with libraries that expect continuous memory buffers for data passing. However, libraries interfacing to data acquisition hardware often use those buffers as ring buffers where, once the buffer has been filled with data, new data will be writte