numpy.random.SeedSequence.generate_state#
method
- random.SeedSequence.generate_state(n_words, dtype=np.uint32)#
Return the requested number of words for PRNG seeding.
A BitGenerator should call this method in its constructor with an appropriate n_words parameter to properly seed itself.
- Parameters:
- n_wordsint
- dtypenp.uint32 or np.uint64, optional
The size of each word. This should only be either
uint32oruint64. Strings (‘uint32’, ‘uint64’) are fine. Note that requestinguint64will draw twice as many bits asuint32for the same n_words. This is a convenience for BitGenerators that express their states asuint64arrays.
- Returns:
- stateuint32 or uint64 array, shape=(n_words,)