dfm / emcee

The Python ensemble sampling toolkit for affine-invariant MCMC
https://emcee.readthedocs.io
MIT License
1.46k stars 431 forks source link

Support modern pseudo-random number generators from Numpy #383

Open HDembinski opened 3 years ago

HDembinski commented 3 years ago

General information:

Problem description:

emcee does not seem to support the new Numpy random number generators. https://numpy.org/doc/stable/reference/random/generator.html#numpy.random.Generator

I want to replace the Mersenne Twistor with the much better PCG generator. I tried setting .random_state on the EnsembleSampler and rstate0 on the run_mcmc call, but I always get "MT19937" when I call the random_state property on the output object.

dfm commented 3 years ago

The open pull request https://github.com/dfm/emcee/pull/376 adds this support but it's still a work in progress. You could follow that PR for updates or see if you could see how to push it over the line!