randomstate.prng.dsfmt.random_uintegers

randomstate.prng.dsfmt.random_uintegers(size=None, bits=64)

Return random unsigned integers

Parameters:
  • size (int or tuple of ints, optional) – Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned.
  • bits (int {32, 64}) – Size of the unsigned integer to return, either 32 bit or 64 bit.
Returns:

out – Drawn samples.

Return type:

uint or ndarray

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.