[Numpy-discussion] contiguous regions

2008-11-20 Thread John Hunter
I frequently want to break a 1D array into regions above and below some threshold, identifying all such subslices where the contiguous elements are above the threshold. I have two related implementations below to illustrate what I am after. The first crossings is rather naive in that it doesn't

Re: [Numpy-discussion] contiguous regions

2008-11-20 Thread Gregor Thalhammer
John Hunter schrieb: I frequently want to break a 1D array into regions above and below some threshold, identifying all such subslices where the contiguous elements are above the threshold. I have two related implementations below to illustrate what I am after. The first crossings is rather