MCPcopy Create free account
hub / github.com/numpy/numpy / __RandomState_ctor

Function __RandomState_ctor

numpy/random/__init__.py:197–210  ·  view source on GitHub ↗

Return a RandomState instance. This function exists solely to assist (un)pickling. Note that the state of the RandomState returned here is irrelevant, as this function's entire purpose is to return a newly allocated RandomState whose state pickle can set. Consequently the RandomSt

()

Source from the content-addressed store, hash-verified

195
196
197def __RandomState_ctor():
198 """Return a RandomState instance.
199
200 This function exists solely to assist (un)pickling.
201
202 Note that the state of the RandomState returned here is irrelevant, as this
203 function's entire purpose is to return a newly allocated RandomState whose
204 state pickle can set. Consequently the RandomState returned by this function
205 is a freshly allocated copy with a seed=0.
206
207 See https://github.com/numpy/numpy/issues/4763 for a detailed discussion
208
209 """
210 return RandomState(seed=0)
211
212
213from numpy._pytesttester import PytestTester

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected