dpnp.random.hypergeometric

dpnp.random.hypergeometric(ngood, nbad, nsample, size=None)[source]

Draw samples from a Hypergeometric distribution.

For full documentation refer to numpy.random.hypergeometric.

Limitations

Parameters ngood, nbad and nsample are supported as scalar. Otherwise, numpy.random.hypergeometric(shape, scale, size) samples are drawn. Output array data type is dpnp.int32.

Examples

Draw samples from the distribution:

>>> ngood, nbad, nsamp = 100, 2, 10
# number of good, number of bad, and number of samples
>>> s = dpnp.random.hypergeometric(ngood, nbad, nsamp, 1000)