Skip to content

Commit 46892c4

Browse files
committed
Fixed rng inside if/else
1 parent 6f94308 commit 46892c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hydrogym/firedrake/utils/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ def white_noise(n_samples, fs, cutoff):
3030
import numpy as np
3131
from scipy import signal
3232

33+
rng = fd.Generator(fd.PCG64())
34+
3335
comm = fd.COMM_WORLD
3436
if comm.rank == 0:
3537
# Generate white noise
36-
rng = fd.Generator(fd.PCG64())
3738
w = rng.standard_normal(n_samples)
3839

3940
# Set up butterworth filter

0 commit comments

Comments
 (0)