dpnp.random.Generator.choice

method

Generator.choice(a, size=None, replace=True, p=None, axis=0, shuffle=True, *, usm_type='device')[source]

Generate a random sample from a given array.

For full documentation refer to numpy.random.Generator.choice.

Limitations

usm_type is not in NumPy's signature. Without replacement, the sample is always in random order, so shuffle has no effect, and memory and time proportional to the population size are used. p is checked only when it is on the host.