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 state tuple has the following items:

  1. a string specifying the basic pseudo-random number generation algorithm.

  2. a bytes object holding the content of Intel MKL’s stream for the given BRNG.

Returns:
outNone

Returns ‘None’ on success.

See also

get_state

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

MKL Documentation