numpy.random.SeedSequence.generate_state

方法

random.SeedSequence.generate_state(n_words, dtype=np.uint32)

返回请求的PRNG种子的字数。

位生成器应该在其构造函数中使用适当的 n_words 参数以正确地为自身设置种子。

参数
n_words利息
dtypenp.uint32号机组或者第64页,可选

每个单词的大小。这只能是 uint32uint64 . 串 ('uint32''uint64' )你很好。请注意,请求 uint64 将提取两倍于 uint32 同样的道理 n_words . 这对我来说很方便 BitGenerator 把他们的状态表示为 uint64 数组。

返回
stateuint32或uint64数组,形状=(nu字)