numpy.random.bit_generator.ISeedSequence.generate_state
attribute
-
ISeedSequence.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_words : int
-
dtype : np.uint32 or np.uint64, optional
-
The size of each word. This should only be either
uint32
oruint64
. Strings (‘uint32’
,‘uint64’
) are fine. Note that requestinguint64
will draw twice as many bits asuint32
for the samen_words
. This is a convenience forBitGenerator`s that express their states as `uint64
arrays.
Returns: -
state : uint32 or uint64 array, shape=(n_words,)
-
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/random/bit_generators/generated/numpy.random.bit_generator.ISeedSequence.generate_state.html