Skip to content

Commit

Permalink
Update docs/tutorials/random-numbers.md
Browse files Browse the repository at this point in the history
Co-authored-by: Roy Frostig <[email protected]>
  • Loading branch information
jakevdp and froystig authored Nov 21, 2023
1 parent 29c091e commit 0d1bf84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tutorials/random-numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ key = random.key(42)
print(key)
```

A key is an array with a special dtype corresponding to the particular PRNG impl being used; in the default impl each key is backed by a pair of `uint32` values.
A key is an array with a special dtype corresponding to the particular PRNG implementation being used; in the default implementation each key is backed by a pair of `uint32` values.

The key is effectively a stand-in for NumPy's hidden state object, but we pass it explicitly to {func}`jax.random` functions.
Importantly, random functions consume the key, but do not modify it: feeding the same key object to a random function will always result in the same sample being generated.
Expand Down

0 comments on commit 0d1bf84

Please sign in to comment.