Re: [Numpy-discussion] indexing, searchsorting, ...

2010-01-26 Thread Jan Strube
Hi Neil, sure...I aeh, knew this...of course...[?] I'm using shuffle with a list of indices now... Thanks, Jan <<330.gif>>___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] indexing, searchsorting, ...

2010-01-26 Thread Neil Martinsen-Burrell
On 2010-01-26 10:22 , Jan Strube wrote: > Dear Josef and Keith, > > thank you both for your suggestions. I think intersect would be what I > want for it makes clean code. > I have, however, spotted the problem: > I was mistakenly under the assumption that random_integers returns > unique entries, w

Re: [Numpy-discussion] indexing, searchsorting, ...

2010-01-26 Thread Jan Strube
Dear Josef and Keith, thank you both for your suggestions. I think intersect would be what I want for it makes clean code. I have, however, spotted the problem: I was mistakenly under the assumption that random_integers returns unique entries, which is of course not guaranteed, so that the random

Re: [Numpy-discussion] indexing, searchsorting, ...

2010-01-25 Thread josef . pktd
On Mon, Jan 25, 2010 at 5:16 PM, Keith Goodman wrote: > On Mon, Jan 25, 2010 at 1:38 PM, Jan Strube wrote: >> Dear List, >> >> I'm trying to speed up a piece of code that selects a subsample based on >> some criteria: >> Setup: >> I have two samples, raw and cut. Cut is a pure subset of raw, all

Re: [Numpy-discussion] indexing, searchsorting, ...

2010-01-25 Thread Keith Goodman
On Mon, Jan 25, 2010 at 1:38 PM, Jan Strube wrote: > Dear List, > > I'm trying to speed up a piece of code that selects a subsample based on some > criteria: > Setup: > I have two samples, raw and cut. Cut is a pure subset of raw, all elements in > cut are also in raw, and cut is derived from ra

[Numpy-discussion] indexing, searchsorting, ...

2010-01-25 Thread Jan Strube
Dear List, I'm trying to speed up a piece of code that selects a subsample based on some criteria: Setup: I have two samples, raw and cut. Cut is a pure subset of raw, all elements in cut are also in raw, and cut is derived from raw by applying some cuts. Now I would like to select a random subs