What do you think is the explanation for that? I had assumed that using a
lookup table would be faster considering that the loggam implementation has
loops and makes calls to elementary functions in it.
--
Sent from: http://numpy-discussion.10968.n7.nabble.com/
I did a quick test and using random_loggam was about 6% faster than using
logfactorial (on Windows).
Kevin
On Sun, Mar 7, 2021 at 2:40 AM Robert Kern wrote:
> On Sat, Mar 6, 2021 at 1:45 PM Warren Weckesser <
> warren.weckes...@gmail.com> wrote:
>
>> At the time, making that change was not a
On Sat, Mar 6, 2021 at 1:45 PM Warren Weckesser
wrote:
> At the time, making that change was not a high priority, so I didn't
> pursue it. It does make sense to use the logfactorial function there,
> and I'd be happy to see it updated, but be aware that making the
> change is more work than
Ah, I had a suspicion that it was to preserve the random stream but wasn't
too sure. Thanks for the clarification.
--
Sent from: http://numpy-discussion.10968.n7.nabble.com/
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
On 3/6/21, zoj613 wrote:
> Hi All,
>
> I noticed that the transformed rejection method for generating Poisson
> random variables used in numpy makes use of the `random_loggam` function
> which directly calculates the log-gamma function. It appears that a
> log-factorial lookup table was added a
Hi All,
I noticed that the transformed rejection method for generating Poisson
random variables used in numpy makes use of the `random_loggam` function
which directly calculates the log-gamma function. It appears that a
log-factorial lookup table was added a few years back which could be used in