user1779646
user1779646

Reputation: 819

sobol random no. generater python

I want to generate random no. using Sobol, I found this page, but I don't know how to use it. How can I use this https://people.sc.fsu.edu/~jburkardt/py_src/sobol/sobol.html to generate random no.

Upvotes: 1

Views: 988

Answers (1)

Severin Pappadeux
Severin Pappadeux

Reputation: 20120

Along the lines:

from sobol import *

seed = 12345 # is is basically index in the sobol sequence
ndim = 1 # dimension of the problem

for _ in range(0, 10):
    [srn, seed] = i4_sobol(ndim, seed)
    print(srn)

PS Ah, I see you're using python-3, it won't work for a time being, it is in python-2. If you could wait, I'll take a look at it in ~10 hours

Upvotes: 2

Related Questions