Skip to content

Commit 457bf40

Browse files
author
Michael Dayan
committed
Correct random seeding by using random library instead of numpy
1 parent 2f6a4e9 commit 457bf40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

heudiconv/tests/test_bids.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
from pathlib import Path
88
from random import (random,
99
shuffle,
10-
choice
10+
choice,
11+
seed
1112
)
1213
from datetime import (datetime,
1314
timedelta,
@@ -18,7 +19,6 @@
1819

1920
import nibabel
2021
import string
21-
import numpy as np
2222
from numpy import testing as np_testing
2323

2424
from heudiconv.utils import (
@@ -51,9 +51,9 @@
5151
import pytest
5252

5353
def gen_rand_label(label_size, label_seed):
54-
np.random.seed(label_seed)
54+
seed(label_seed)
5555
rand_char = ''.join(choice(string.ascii_letters) for _ in range(label_size-1))
56-
np.random.seed(label_seed)
56+
seed(label_seed)
5757
rand_num = choice(string.digits)
5858
return rand_char + rand_num
5959

0 commit comments

Comments
 (0)