A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://numpy.org/doc/stable/reference/random/generated/numpy.random.RandomState.get_state.html below:

numpy.random.RandomState.get_state — NumPy v2.3 Manual

numpy.random.RandomState.get_state#

method

random.RandomState.get_state(legacy=True)#

Return a tuple representing the internal state of the generator.

For more details, see set_state.

Parameters:
legacybool, optional

Flag indicating to return a legacy tuple state when the BitGenerator is MT19937, instead of a dict. Raises ValueError if the underlying bit generator is not an instance of MT19937.

Returns:
out{tuple(str, ndarray of 624 uints, int, int, float), dict}

If legacy is True, 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. a float cached_gaussian.

If legacy is False, or the BitGenerator is not MT19937, then state is returned as a dictionary.

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.


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