MCPcopy Create free account
hub / github.com/numpy/numpy / random_negative_binomial

Function random_negative_binomial

numpy/random/src/distributions/distributions.c:606–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604}
605
606RAND_INT_TYPE random_negative_binomial(bitgen_t *bitgen_state, double n,
607 double p) {
608 double Y = random_gamma(bitgen_state, n, (1 - p) / p);
609 return random_poisson(bitgen_state, Y);
610}
611
612RAND_INT_TYPE random_binomial_btpe(bitgen_t *bitgen_state, RAND_INT_TYPE n,
613 double p, binomial_t *binomial) {

Callers

nothing calls this directly

Calls 2

random_gammaFunction · 0.85
random_poissonFunction · 0.85

Tested by

no test coverage detected