In [1]:
import tohu
from tohu import *
In [2]:
print(f"Tohu version: {tohu.__version__}")
This is a quick sanity check that resetting a NumpyRandomGenerator
really fully resets the state and leads to independent runs.
In [3]:
g = NumpyRandomGenerator(method="normal", loc=3.0, scale=5.0)
g.reset(seed=12345); print_generated_sequence(g, num=4)
g.reset(seed=99999); print_generated_sequence(g, num=4)
In [4]:
g1 = NumpyRandomGenerator(method="normal", loc=3.0, scale=5.0)
g2 = NumpyRandomGenerator(method="normal", loc=3.0, scale=5.0)
g1.reset(seed=12345)
g2.reset(seed=99999)
print_generated_sequence(g1, num=4)
print_generated_sequence(g2, num=4)
In [ ]: