networkx.utils.misc.create_random_state

create_random_state(random_state=None)[source]

Returns a numpy.random.RandomState instance depending on input.

Parameters
random_stateint or RandomState instance or None optional (default=None)

If int, return a numpy.random.RandomState instance set with seed=int. if numpy.random.RandomState instance, return it. if None or numpy.random, return the global random number generator used by numpy.random.