[Numpy-discussion] Overlapping time series
Sturla Molden
sturla.molden at gmail.com
Tue Feb 11 12:18:31 EST 2014
Daniele Nicolodi <daniele at grinta.net> wrote:
> That's more or less my current approach (except that I use the fact that
> the data is evenly samples to use np.where(np.diff(t1) != dt) to detect
> the regions of continuous data, to avoid the loop.
I hope you realize that np.where(np.diff(t1) != dt) generates three loops,
as well as two temporary arrays and one output array. If you do what I
suggested, you get one loop and no temporaries. But you will need Numba or
Cython to get full speed.
Sturla
More information about the NumPy-Discussion
mailing list