[Numpy-discussion] indexing with booleans without making a copy?

2010-09-08 Thread Ernest Adrogué
Hello, I have a sorted, flat array: In [139]: a =np.array([0,1,2,2,2,3]) Basically, I want views of the areas where there are repeated numbers (since the array is sorted, they will be contiguous). But, of course, to find the numbers that are repeated I have to use comparison operations that ret

Re: [Numpy-discussion] indexing with booleans without making a copy?

2010-09-08 Thread Anne Archibald
2010/9/8 Ernest Adrogué : > I have a sorted, flat array: > > In [139]: a =np.array([0,1,2,2,2,3]) > > Basically, I want views of the areas where there > are repeated numbers (since the array is sorted, they > will be contiguous). > > But, of course, to find the numbers that are repeated > I have to

Re: [Numpy-discussion] indexing with booleans without making a copy?

2010-09-08 Thread josef . pktd
2010/9/8 Ernest Adrogué : > Hello, > > I have a sorted, flat array: > > In [139]: a =np.array([0,1,2,2,2,3]) > > Basically, I want views of the areas where there > are repeated numbers (since the array is sorted, they > will be contiguous). > > But, of course, to find the numbers that are repeated

Re: [Numpy-discussion] indexing with booleans without making a copy?

2010-09-08 Thread Ernest Adrogué
8/09/10 @ 15:35 (-0400), thus spake Anne Archibald: > 2010/9/8 Ernest Adrogué : > > I have a sorted, flat array: > > > > In [139]: a =np.array([0,1,2,2,2,3]) > > > > Basically, I want views of the areas where there > > are repeated numbers (since the array is sorted, they > > will be contiguous).