[Numpy-discussion] generate a random sample based on independent priors in `random.choice` #22082

2022-08-04 Thread Rodo-Singh
Proposed new feature or change: Objective: Sample elements from the given iterator (a list, a numpy array, etc.) based upon pre-defined probabilities associated with each element which may not sums upto 1. Overview * In the numpy.random.choice function the cases where we're explicitly providing

[Numpy-discussion] Re: generate a random sample based on independent priors in `random.choice` #22082

2022-08-04 Thread Robert Kern
As discussed on the corresponding Github issue[1], this is not going to be functionality that we add onto `choice()` nor is it likely something that we will add as a separate `Generator` method. The desired computation is straightforward to do by composing existing functionality. [1] https://githu

[Numpy-discussion] Re: generate a random sample based on independent priors in `random.choice` #22082

2022-08-04 Thread Matti Picus
Every new feature, method, function or keyword argument adds cognitive load, maintainer burden, makes the package larger, and can confuse users so we reject much more than we accept. The first step would be to present a convincing case _why_ Poisson sampling should be added to NumPy, before di