I'm working on creating a subclass of random.Random() where the generator is actually NumPy's default Random Generator.
The reason for this is, I can leverage parallel execution using NumPy's generator via the SeedSequence object.
Overriding methods random() and seed() is fairly easy, however, I also need to override method getrandbits(), but I haven't been able to find any Numpy's equivalent function/solution. getrandbits() is used heavily by all other functions of class random.Random().
Aucun commentaire:
Enregistrer un commentaire