RandomState.set_state()
numpy.random.RandomState.set_state
-
RandomState.set_state(state)
-
Set the internal state of the generator from a tuple.
For use if one has reason to manually (re-)set the internal state of the “Mersenne Twister”[R190] pseudo-random number generating algorithm.
Parameters: state : tuple(str, ndarray of 624 uints, int, int, float)
The
state
tuple has the following items:- the string ‘MT19937’, specifying the Mersenne Twister algorithm.
- a 1-D array of 624 unsigned integers
keys
. - 登录查看完整内容