Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66565

Re: random.sample with large weighted sample-sets? [SOLVED]

Date 2014-02-16 13:58 -0600
From Tim Chase <python.list@tim.thechases.com>
Subject Re: random.sample with large weighted sample-sets? [SOLVED]
References <20140215224145.68c82eb4@bigbox.christie.dr> <ldpve4$tnk$1@ger.gmane.org> <20140216082250.7aecebb4@bigbox.christie.dr> <ldr4ls$q4u$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.7071.1392580651.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 2014-02-16 14:47, Terry Reedy wrote:
> > 2) the data has to be sorted for bisect to work  
> 
> cumulative sums are automatically sorted.

Ah, that they were *cumulative* was the key that I missed in my
understanding.  It makes sense now and works like a charm.

Thanks to all who offered a hand in this thread.

-tkc


Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: random.sample with large weighted sample-sets? [SOLVED] Tim Chase <python.list@tim.thechases.com> - 2014-02-16 13:58 -0600

csiph-web