Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-11 Thread Warren Weckesser
On Tue, Dec 11, 2018 at 2:27 PM Stephan Hoyer wrote: > On Tue, Dec 11, 2018 at 10:39 AM Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> There is no bug, just a limitation in the API. >> >> When I draw without replacement, say, three values from a collection of >> length five, the

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-11 Thread Stephan Hoyer
On Tue, Dec 11, 2018 at 10:39 AM Warren Weckesser < warren.weckes...@gmail.com> wrote: > There is no bug, just a limitation in the API. > > When I draw without replacement, say, three values from a collection of > length five, the three values that I get are not independent. So really, > this is

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-11 Thread Warren Weckesser
On Tue, Dec 11, 2018 at 1:37 PM Warren Weckesser wrote: > > > On Tue, Dec 11, 2018 at 10:32 AM Ralf Gommers > wrote: > >> >> >> On Mon, Dec 10, 2018 at 10:27 AM Warren Weckesser < >> warren.weckes...@gmail.com> wrote: >> >>> >>> >>> On 12/10/18, Ralf Gommers wrote: >>> > On Sun, Dec 9, 2018 at

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-11 Thread Warren Weckesser
On Tue, Dec 11, 2018 at 10:32 AM Ralf Gommers wrote: > > > On Mon, Dec 10, 2018 at 10:27 AM Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> >> >> On 12/10/18, Ralf Gommers wrote: >> > On Sun, Dec 9, 2018 at 2:00 PM Alan Isaac wrote: >> > >> >> I believe this was proposed in the

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-11 Thread Ralf Gommers
On Mon, Dec 10, 2018 at 10:27 AM Warren Weckesser < warren.weckes...@gmail.com> wrote: > > > On 12/10/18, Ralf Gommers wrote: > > On Sun, Dec 9, 2018 at 2:00 PM Alan Isaac wrote: > > > >> I believe this was proposed in the past to little enthusiasm, > >> with the response, "you're using a

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-10 Thread Warren Weckesser
On 12/10/18, Ralf Gommers wrote: > On Sun, Dec 9, 2018 at 2:00 PM Alan Isaac wrote: > >> I believe this was proposed in the past to little enthusiasm, >> with the response, "you're using a library; learn its functions". >> > > Not only that, NumPy and the core libraries around it are the

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-10 Thread Stephan Hoyer
On Mon, Dec 10, 2018 at 8:26 AM Alan Isaac wrote: > On 12/10/2018 11:20 AM, Ralf Gommers wrote: > > there is nothing wrong with the current API > > Just to be clear: you completely reject the past > cautions on this list against creating APIs > with flag parameters. Is that correct? > > Or is

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-10 Thread Ralf Gommers
On Mon, Dec 10, 2018 at 8:27 AM Alan Isaac wrote: > On 12/10/2018 11:20 AM, Ralf Gommers wrote: > > there is nothing wrong with the current API > > Just to be clear: you completely reject the past > cautions on this list against creating APIs > with flag parameters. Is that correct? > There's

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-10 Thread Tyler Reddy
I think the current random infrastructure is mostly considered frozen anyway, even for bugfixes, given the pending NEP to produce a new random infrastructure and the commitment therein to guarantee that old random streams behave the same way given their extensive use in testing and so on. Maybe

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-10 Thread Alan Isaac
On 12/10/2018 11:20 AM, Ralf Gommers wrote: there is nothing wrong with the current API Just to be clear: you completely reject the past cautions on this list against creating APIs with flag parameters. Is that correct? Or is "nothing wrong" just a narrow approval in this particular case?

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-10 Thread Ralf Gommers
On Sun, Dec 9, 2018 at 2:00 PM Alan Isaac wrote: > I believe this was proposed in the past to little enthusiasm, > with the response, "you're using a library; learn its functions". > Not only that, NumPy and the core libraries around it are the standard for numerical/statistical computing. If

[Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-09 Thread Alan Isaac
I believe this was proposed in the past to little enthusiasm, with the response, "you're using a library; learn its functions". Nevertheless, given the addition of `choices` to the Python random module in 3.6, it would be nice to have the *same name* for parallel functionality in numpy.random.