On 12 October 2012 03:22, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Wed, 10 Oct 2012 23:44:42 -0700, suzaku wrote:
I think if a programmer has used the built-in `random` module before, he
would expect a function with sample in its name to return a population
On Wed, 10 Oct 2012 20:33:16 -0700, Satoru Logic wrote:
I came across a function named `wsample` in a `utils` package of my
workplace recently.
The w in `wsample` stands for `weighted`, and it randomly selects an
element from a container according to relative weights of all the
elements.
On Thursday, October 11, 2012 2:29:37 PM UTC+8, Steven D'Aprano wrote:
On Wed, 10 Oct 2012 20:33:16 -0700, Satoru Logic wrote:
I came across a function named `wsample` in a `utils` package of my
workplace recently.
The w in `wsample` stands for `weighted`, and it randomly
On Wed, 10 Oct 2012 23:44:42 -0700, suzaku wrote:
I think if a programmer has used the built-in `random` module before, he
would expect a function with sample in its name to return a population
sequence.
I have used the random module for about fifteen years, and I still write
random.sample
On Friday, October 12, 2012 10:22:16 AM UTC+8, Steven D'Aprano wrote:
On Wed, 10 Oct 2012 23:44:42 -0700, suzaku wrote:
I think if a programmer has used the built-in `random` module before, he
would expect a function with sample in its name to return a population
sequence.
I came across a function named `wsample` in a `utils` package of my workplace
recently.
The w in `wsample` stands for `weighted`, and it randomly selects an element
from a container according to relative weights of all the elements.
In most articles and codes I saw online, a function like this
On 10/10/2012 11:33 PM, Satoru Logic wrote:
I came across a function named `wsample` in a `utils` package of my
workplace recently.
The w in `wsample` stands for `weighted`, and it randomly selects
an element from a container according to relative weights of all the
elements.
I agree that
On Oct 11, 1:33 pm, Satoru Logic satorulo...@gmail.com wrote:
I came across a function named `wsample` in a `utils` package
of my workplace recently.
The w in `wsample` stands for `weighted`, and it randomly
selects an element from a container according to relative
weights of all the