mkl_random.MKLRandomState.set_state¶
- MKLRandomState.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 chosen pseudo-random number generating algorithm.
- Parameters:
- statetuple(str, bytes) or dict
The
statetuple has the following items:a string specifying the basic pseudo-random number generation algorithm.
a bytes object holding the content of Intel MKL’s stream for the given BRNG.
- Returns:
- outNone
Returns ‘None’ on success.
See also
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 in such a case keys are used to seed the generator, and position index pos is ignored:
state = ('MT19937', keys, pos)References