Skip to content

Commit

Permalink
Merge pull request #9564 from MichaelMarien:random-choice-docstring
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 428596963
  • Loading branch information
jax authors committed Feb 14, 2022
2 parents beaa00c + 20e5090 commit d569440
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jax/_src/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,11 @@ def choice(key: KeyArray,
axis: int = 0) -> jnp.ndarray:
"""Generates a random sample from a given array.
.. warning::
If ``p`` has fewer non-zero elements than the requested number of samples,
as specified in ``shape``, and ``replace=False``, the output of this
function is ill-defined. Please make sure to use appropriate inputs.
Args:
key: a PRNG key used as the random key.
a : array or int. If an ndarray, a random sample is generated from
Expand Down

0 comments on commit d569440

Please sign in to comment.