Skip to content

Commit d24ee76

Browse files
authored
Fix wrong randomness in ou process input (#715)
* Update CI.yml * Update currents.py * Update requirements-dev.txt * Update requirements-dev.txt * Update test_noise_groups.py * Update test_noise_groups.py * Update test_noise_groups.py
1 parent a2392aa commit d24ee76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

brainpy/_src/inputs/currents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def ou_process(mean, sigma, tau, duration, dt=None, n=1, t_start=0., t_end=None,
306306
x = bm.Variable(jnp.ones(n) * mean)
307307

308308
def _f(t):
309-
x.value = x + dt * ((mean - x) / tau) + sigma * dt_sqrt * rng.rand(n)
309+
x.value = x + dt * ((mean - x) / tau) + sigma * dt_sqrt * rng.randn(n)
310310
return x.value
311311

312312
noises = bm.for_loop(_f, jnp.arange(t_start, t_end, dt))

0 commit comments

Comments
 (0)