This is documentation for an old release of NumPy (version 1.3.). Read this page in the documentation of the latest stable release (version > 1.17).

numpy.random.set_state

numpy.random.set_state(state)

Set the state from a tuple.

state = (‘MT19937’, int key[624], int pos, int has_gauss, float cached_gaussian)

For backwards compatibility, the following form is also accepted although it is missing some information about the cached Gaussian value.

state = (‘MT19937’, int key[624], int pos)

Previous topic

numpy.random.get_state

Next topic

Sorting and searching

This Page

Quick search