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().
random.getrandbitsand port that to numpyint.from_bytes(_urandom(numbytes), 'big'). Will work on that if I don't get the easier, expected answer.random()andgetrandbits(). Class random.Random() however cannot be parallelized and the BitGenerator cannot be advanced (PCG64 can).int.from_bytes(np.random.default_rng().bytes(numbytes), 'big'). Thanks!