numpy.random.
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â[1] pseudo-random number generating algorithm.
Parameters:The state tuple has the following items:
keys
.pos
.has_gauss
.cached_gaussian
.Returns âNoneâ on success.
Notes
set_state
and get_state
are not needed to work with any of the random distributions in NumPy. If the internal state is manually altered, the user should know exactly what he/she is doing.
For backwards compatibility, the form (str, array of 624 uints, int) is also accepted although it is missing some information about the cached Gaussian value: state = ('MT19937', keys, pos)
.
References
[1] (1, 2) M. Matsumoto and T. Nishimura, âMersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generator,â ACM Trans. on Modeling and Computer Simulation, Vol. 8, No. 1, pp. 3-30, Jan. 1998.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4