os.urandom returns byte, not string in python3
This commit is contained in:
parent
1d936fc5f2
commit
7c1e2e256c
|
@ -127,7 +127,7 @@ options.fraction = np.array(options.fraction)
|
|||
options.grid = np.array(options.grid)
|
||||
gridSize = options.grid.prod()
|
||||
|
||||
if options.randomSeed is None: options.randomSeed = int(os.urandom(4).encode('hex'), 16)
|
||||
if options.randomSeed is None: options.randomSeed = int(os.urandom(4).hex(), 16)
|
||||
np.random.seed(options.randomSeed) # init random generators
|
||||
random.seed(options.randomSeed)
|
||||
|
||||
|
|
Loading…
Reference in New Issue