mardi 15 décembre 2020

How to have multiple numpy random generating objects with different seeds t the same time

To describe what I mean, consider the following dummy example:

import numpy as np1
import numpy as np2

seed1 = 1
seed2 = 2

np1.random.seed(seed1)
np2.random.seed(seed2)

where np1.random.normal(0, 2, 1) returns a value completely regardless of what seed2 was. (Which of course does not work in this example.

Is there anyway to have such functionality where there are two independent random generating objects?




Aucun commentaire:

Enregistrer un commentaire