jax.random.PRNGKey#
- jax.random.PRNGKey(seed, *, impl=None)[source]#
Create a pseudo-random number generator (PRNG) key given an integer seed.
The resulting key carries the default PRNG implementation, as determined by the optional
implargument or, otherwise, by thejax_default_prng_implconfig flag.- Parameters:
seed (int | ArrayLike) – a 64- or 32-bit integer used as the value of the key.
impl (Optional[PRNGSpecDesc]) – optional string specifying the PRNG implementation (e.g.
'threefry2x32')
- Return type:
KeyArray
- Returns:
A PRNG key, consumable by random functions as well as
splitandfold_in.