Does numpy.random.seed() always give the same random number every time?
问题 I know that numpy.random.seed(seed) will output the same numbers if I use the same seed. My question is, does this change over time? If I try to call it again tomorrow, will it still output the same set of random numbers as yesterday? 回答1: The np.random documentation describes the PRNGs used. Apparently, there was a partial switch from MT19937 to PCG64 in the recent past. If you want consistency, you'll need to: fix the PRNG used, and ensure that you're using a local handle (e.g. RandomState