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

Function random_positive_int

numpy/random/src/distributions/distributions.c:320–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320int64_t random_positive_int(bitgen_t *bitgen_state) {
321#if ULONG_MAX <= 0xffffffffUL
322 return (int64_t)(next_uint32(bitgen_state) >> 1);
323#else
324 return (int64_t)(next_uint64(bitgen_state) >> 1);
325#endif
326}
327
328uint64_t random_uint(bitgen_t *bitgen_state) {
329#if ULONG_MAX <= 0xffffffffUL

Callers

nothing calls this directly

Calls 2

next_uint32Function · 0.85
next_uint64Function · 0.85

Tested by

no test coverage detected