Looking to match the Python equivalent seed to match R w/ set.seed(123). Is this possible to do in Python, perhaps with some shared C library? Tried the below with a vary large range, and stalled out. Perpaps there is a better way to do this -- and likely to get many mismatches only using a 3 element vector.
import numpy as np
# R set.seed(123); rnorm(mean = 0, sd = 1, n = 10)
Rdat = np.array([-0.56047565, -0.23017749, 1.55870831])
for x in range(0, 100000000):
mu, sigma = 0, 0.1 # mean and standard deviation
np.random.seed(x)
pyDat = np.random.normal(mu, sigma, 3)
if Rdat[0]==pyDat[0] and Rdat[1]==pyDat[1] and Rdat[2]==pyDat[2]:
print(x)