Spaces:
Sleeping
Sleeping
Download tests/test_rng_sequence.py from gagan-devv/CloudOptRL: direct link, hf CLI and curl.
- Browser
- Download file 417 Bytes
-
https://huggingface.co/spaces/gagan-devv/CloudOptRL/resolve/main/tests/test_rng_sequence.py
- Command line
-
hf download hf://spaces/gagan-devv/CloudOptRL/tests/test_rng_sequence.py
-
curl -L -o test_rng_sequence.py https://huggingface.co/spaces/gagan-devv/CloudOptRL/resolve/main/tests/test_rng_sequence.py
417 Bytes
| #!/usr/bin/env python | |
| """Test RNG sequence.""" | |
| import numpy as np | |
| # Test RNG sequences | |
| rng1 = np.random.RandomState() | |
| rng1.seed(2) | |
| print("RNG1 (seed=2) sequence:") | |
| for i in range(5): | |
| val = rng1.normal(0, 10.0) | |
| print(f" {i}: {val:.4f}") | |
| print() | |
| rng2 = np.random.RandomState() | |
| rng2.seed(50) | |
| print("RNG2 (seed=50) sequence:") | |
| for i in range(5): | |
| val = rng2.normal(0, 10.0) | |
| print(f" {i}: {val:.4f}") | |