Daniele Nicolodi <dani...@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 _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion