(seed)
Turn seed into np.random.RandomState instance
Turn seed into np.random.RandomState instance
Turn seed into np . random . RandomState instance
def seed_random_state(seed):
    """Turn seed into np.random.RandomState instance
    """
    if (seed is None) or (isinstance(seed, int)):
        return np.random.RandomState(seed)
    elif isinstance(seed, np.random.RandomState):
        return seed
    raise ValueError("%r can not be used to generate numpy.random.RandomState"
                     " instance" % seed)
def seed_random_state ( seed ) : if ( seed is None ) or ( isinstance ( seed , int ) ) : return np . random . RandomState ( seed ) elif isinstance ( seed , np . random . RandomState ) : return seed raise ValueError ( "%r can not be used to generate numpy.random.RandomState" " instance" % seed )