Skip to content

add u32[4] as possible PRNGKeyArray type#388

Merged
patrick-kidger merged 2 commits into
patrick-kidger:mainfrom
jondeaton:main
May 5, 2026
Merged

add u32[4] as possible PRNGKeyArray type#388
patrick-kidger merged 2 commits into
patrick-kidger:mainfrom
jondeaton:main

Conversation

@jondeaton
Copy link
Copy Markdown
Contributor

jax.random.key(0, impl="rbg") gives

Array((), dtype=key<rbg>) overlaying:
[0 0 0 0]

@patrick-kidger
Copy link
Copy Markdown
Owner

Should this not already be handled by the Key dtype? (Which is distinct from PRNGKeyArray, which largely exists for backwards compatibility with now-very-old JAX.)

@jondeaton
Copy link
Copy Markdown
Contributor Author

jondeaton commented May 1, 2026

good point Key already seems to cover this. thank you

@jondeaton jondeaton closed this May 1, 2026
@jondeaton
Copy link
Copy Markdown
Contributor Author

actually this is to cover the case of

jax.random.PRNGKey(0, impl="rbg")
Array([0, 0, 0, 0], dtype=uint32)

@jondeaton jondeaton reopened this May 1, 2026
@patrick-kidger patrick-kidger merged commit a3e7bef into patrick-kidger:main May 5, 2026
2 checks passed
@patrick-kidger
Copy link
Copy Markdown
Owner

Merged!

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

Successfully merging this pull request may close these issues.

2 participants