nlcpy.random.RandomState.set_state

RandomState.set_state(self, state)

Sets the internal state of the generator from an ndarray.

For use if one has reason to manually (re-)set the internal state of the bit generator used by the RandomState instance.

Parameters
statetuple(ndarray, int, float)

The tuple has the following items:

  1. an ndarray containing seeds to be required for generating random numbers.

  2. an integer has_gauss.

  3. a float cached_gaussian.

Returns
outNone

Returns ‘None’ on success.

See also

RandomState.get_state

Returns a tuple representing the internal state of the generator.

Note

RandomState.set_state() and RandomState.get_state() are not needed to work with any of therandom distributions in NLCPy.