choice
- sherpa.utils.random.choice(rng: Generator | RandomState | None, xs: Sequence, n) ndarray[source] [edit on github]
Create a subset of elements from xs with no duplication.
- Parameters:
- rng
numpy.random.Generator,numpy.random.RandomState,orNone Determines how the random numbers are created. If set to None then the
numpy.random.choiceroutine is used.- xs
Sequence of values.
- n
The number of values to select from xs.
- rng
- Returns:
- values
ndarray
- values