I want to model wiener process and I want to add some implementation of elementary result, so I want to write something like this:
# w is elementary result
def W(T, w = 0, dt = 0.001):
x = [0]
for t in np.arange(0, T, dt):
x.append(x[-1] + np.random.normal(0,dt, w))
return x
and I expect that with same w
I got same output of W
. But np.random.normal
doesn't support such thing. How can I implement it?