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

Function legacy_random_geometric

numpy/random/src/legacy/legacy-distributions.c:399–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399int64_t legacy_random_geometric(bitgen_t *bitgen_state, double p) {
400 if (p >= 0.333333333333333333333333) {
401 return (int64_t)random_geometric_search(bitgen_state, p);
402 } else {
403 return (int64_t)legacy_geometric_inversion(bitgen_state, p);
404 }
405}
406
407void legacy_random_multinomial(bitgen_t *bitgen_state, RAND_INT_TYPE n,
408 RAND_INT_TYPE *mnix, double *pix, npy_intp d,

Callers

nothing calls this directly

Calls 2

random_geometric_searchFunction · 0.85

Tested by

no test coverage detected