Skip to content

BUG: fully reset cached RNG state for non-MT19937 RNGs - #32062

Merged
ngoldbaum merged 1 commit into
numpy:mainfrom
ngoldbaum:fix-gauss-cache
Jul 22, 2026
Merged

BUG: fully reset cached RNG state for non-MT19937 RNGs#32062
ngoldbaum merged 1 commit into
numpy:mainfrom
ngoldbaum:fix-gauss-cache

Conversation

@ngoldbaum

Copy link
Copy Markdown
Member

PR summary

I noticed this working on #32061 but it's a separate issue unrelated to thread safety. See the test for a case where it could lead to an RNG producing output based on an old state.

AI Disclosure

An AI model identified the bug.

@rkern rkern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ngoldbaum
ngoldbaum merged commit 26ae451 into numpy:main Jul 22, 2026
91 of 93 checks passed
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 27, 2026
charris added a commit that referenced this pull request Jul 27, 2026
BUG: fully reset cached RNG state for non-MT19937 RNGs (#32062)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants