# mdtraj.utils.check_random_state

mdtraj.utils.check_random_state(seed)

  Turn seed into a np.random.RandomState instance

  Parameters:

    seed ({None, int, RandomState}) – Seed for a random number generator

  Returns:

    randomstate – If seed is None, return the RandomState singleton used by np.random. If seed is an int, return a new RandomState instance seeded with seed. If seed is already a RandomState instance, return it. Otherwise raise ValueError.

  Return type:

    RandomState