Skip to main content
`Ctrl`+`K`
scipy.stats.sampling.DiscreteAliasUrn.

# set_random_state

DiscreteAliasUrn.set_random_state(random_state=None)

  Set the underlying uniform random number generator.

  Parameters:
    random_state{None, int, `numpy.random.Generator`,

      > `numpy.random.RandomState`}, optional

      A NumPy random number generator or seed for the underlying NumPy random number generator used to generate the stream of uniform random numbers. If random_state is None (or np.random), the `numpy.random.RandomState` singleton is used. If random_state is an int, a new `RandomState` instance is used, seeded with random_state. If random_state is already a `Generator` or `RandomState` instance then that instance is used.