[Numpy-discussion] Using logfactorial instead of loggamma in random_poisson sampler

Robert Kern robert.kern at gmail.com
Sat Mar 6 21:39:38 EST 2021

On Sat, Mar 6, 2021 at 1:45 PM Warren Weckesser <warren.weckesser at gmail.com>

> 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 changing just the function call.

Does it make a big difference? Per NEP 19, even in `Generator`, we do weigh
the cost of changing the stream reasonably highly. Improved accuracy is
likely worthwhile, but a minor performance improvement is probably not.

Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/numpy-discussion/attachments/20210306/3faa02a4/attachment.html>

More information about the NumPy-Discussion mailing list