Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in .jumped() behavior between numpy and randomgen PCG64 #398

Open
gahtan-syarif opened this issue Nov 15, 2024 · 1 comment
Open

Comments

@gahtan-syarif
Copy link
Contributor

It seems .jumped() when applied to PCG64 bitgenerator advances the state by different amounts when using numpy and randomgen's implementation. This is true even when numpy_seed parameter is set to True. Looking at numpy documentation and randomgen code it seems that numpy has a more sophisticated jump mechanism where it advances the state based on a value derived from the golden ratio to reduce correlation between streams, while randomgen jumps by multiples of 2^64. Now is this deviation from numpy's jump implementation intentional? Or is it possible to make randomgen's behavior the same as that of numpy's?

@bashtage
Copy link
Owner

I think that is right. I put the golden ratio in based on feedback from the PCG author. Forgot to backport it. Should update randomgen to match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants