Re: [Numpy-discussion] finding longest contiguous array slices

2011-05-22 Thread Tom Krauss
On Sat, May 21, 2011 at 5:55 AM, Ben Elliston wrote: > I have a 3-d array of booleans (5 x 5 x 1000, say) and would like to > return a 5 x 5 of array slices containing the longest contiguous > sequence of True values along the z axis. What do you mean by "5 x 5 of array slices containing the long

[Numpy-discussion] finding longest contiguous array slices

2011-05-21 Thread Ben Elliston
Hi all. I have a 3-d array of booleans (5 x 5 x 1000, say) and would like to return a 5 x 5 of array slices containing the longest contiguous sequence of True values along the z axis. Any tricks that I am missing that will make this easy? Thanks, Ben _