本文簡要介紹 python 語言中 numpy.random.RandomState.seed
的用法。
用法:
random.RandomState.seed(self, seed=None)
重新播種舊版 MT19937 BitGenerator
注意:
這是一個方便的遺留函數。
最佳做法是不要重新植入 BitGenerator,而是重新創建一個新的。出於遺留原因,此方法在這裏。這個例子展示了最佳實踐。
>>> from numpy.random import MT19937 >>> from numpy.random import RandomState, SeedSequence >>> rs = RandomState(MT19937(SeedSequence(123456789))) # Later, you want to restart the stream >>> rs = RandomState(MT19937(SeedSequence(987654321)))
相關用法
- Python numpy RandomState.standard_exponential用法及代碼示例
- Python numpy RandomState.standard_gamma用法及代碼示例
- Python numpy RandomState.standard_normal用法及代碼示例
- Python numpy RandomState.shuffle用法及代碼示例
- Python numpy RandomState.standard_t用法及代碼示例
- Python numpy RandomState.standard_cauchy用法及代碼示例
- Python numpy RandomState.bytes用法及代碼示例
- Python numpy RandomState.uniform用法及代碼示例
- Python numpy RandomState.power用法及代碼示例
- Python numpy RandomState.geometric用法及代碼示例
- Python numpy RandomState.random_sample用法及代碼示例
- Python numpy RandomState.gumbel用法及代碼示例
- Python numpy RandomState.logseries用法及代碼示例
- Python numpy RandomState.noncentral_chisquare用法及代碼示例
- Python numpy RandomState.wald用法及代碼示例
- Python numpy RandomState.chisquare用法及代碼示例
- Python numpy RandomState.poisson用法及代碼示例
- Python numpy RandomState.randn用法及代碼示例
- Python numpy RandomState.vonmises用法及代碼示例
- Python numpy RandomState.gamma用法及代碼示例
- Python numpy RandomState.zipf用法及代碼示例
- Python numpy RandomState.triangular用法及代碼示例
- Python numpy RandomState.f用法及代碼示例
- Python numpy RandomState.rayleigh用法及代碼示例
- Python numpy RandomState.randint用法及代碼示例
注:本文由純淨天空篩選整理自numpy.org大神的英文原創作品 numpy.random.RandomState.seed。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。