randomgen.generator.Generator.uintegers¶
- Generator.uintegers(size=None, bits=64)¶
Return random unsigned integers
- Parameters
- sizeint or tuple of ints, optional
Output shape. If the given shape is, e.g.,
(m, n, k)
, thenm * n * k
samples are drawn. Default is None, in which case a single value is returned.- bitsint {32, 64}
Size of the unsigned integer to return, either 32 bit or 64 bit.
- Returns
- outuint or ndarray
Drawn samples.
Notes
This method effectively exposes access to the raw underlying pseudo-random number generator since these all produce unsigned integers. In practice these are most useful for generating other random numbers. These should not be used to produce bounded random numbers by simple truncation.