mtalg.random.hypergeometric
- hypergeometric(ngood: int, nbad: int, nsample: int, size: int | tuple | None = None) ndarray | Number[source]
Draw from a hypergeometric distribution.
- Parameters:
ngood – Number of ways to make a good selection. Must be nonnegative and less than 10**9.
nbad – Number of ways to make a bad selection. Must be nonnegative and less than 10**9.
nsample – Number of items sampled. Must be nonnegative and less than ngood + nbad.
size – Output shape.
- Returns:
numpy.ndarray or scalar.