numpy.random.RandomState.get_state

RandomState.get_state()

返回一个元组,表示生成器的内部状态。

For more details, see set_state.

Returns:

out : tuple(str, ndarray of 624 uints, int, int, float)

The returned tuple has the following items:

  1. the string ‘MT19937’.
  2. a 1-D array of 624 unsigned integer keys.
  3. an integer pos.
  4. an integer has_gauss.
  5. 浮点数cached_gaussian

另见

set_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.