I'm using the low-level generator. In this example I need to generate small random integers of defined bit widths (e.g., 2 bit). So I get 64-bit uniform random uintegers, and cache the values, returning them n-bits (e.g. 2 bits) at a time to the caller.
On Fri, Sep 20, 2019 at 9:03 AM Matti Picus <matti.pi...@gmail.com> wrote: > > On 20/9/19 2:18 pm, Neal Becker wrote: > > I have used C-api in the past, and would like to see a convenient and > > stable way to do this. Currently I'm using randomgen, but calling > > (from c++) > > to the python api. The inefficiency is amortized by generating and > > caching batches of results. > > > > I thought randomgen was supposed to be the future of numpy random, so > > I've based on that. > > > > It would be good to have actual users tell us what APIs they need. > > Are you using the BitGenerators or only the higher level Generator > functions? > > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion -- Those who don't understand recursion are doomed to repeat it _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion