Skip to content

Commit

Permalink
EBR-43: refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
915-Misan-Teodora committed Apr 5, 2024
1 parent 37980c6 commit 992c10c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tvbwidgets/tests/ts/test_data_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@pytest.fixture
def wrapper_np():
""" Returns an initialized Numpy wrapper with 3 dimensions """
rng = np.random.default_rng()
rng = np.random.default_rng(50)
numpy_array = rng.random(size=(30000, 4, 50))
wrapper_np = WrapperNumpy(numpy_array, 0.01, ch_idx=2)
return wrapper_np
Expand Down
2 changes: 1 addition & 1 deletion tvbwidgets/tests/ts/test_mne_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_create_channel_selection_area(tsw_tvb_data):

def test_dimensions_selection_update(tsw_tvb_data):
# simulate unchecking of some checkboxes
rng = np.random.default_rng()
rng = np.random.default_rng(50)
false_cb_idx = list(rng.choice(76, size=3, replace=False))
false_cb_names = [f'sig {x}' for x in false_cb_idx]
for cb_name in false_cb_names:
Expand Down
2 changes: 1 addition & 1 deletion tvbwidgets/tests/ts/ts_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def generate_ts_with_mode_and_sv(length=5e3, cutoff=500, conn=None):

def _generate_connectivity(no_of_regions):
labels = np.array(['sig ' + str(i) for i in range(no_of_regions)])
rng = np.random.default_rng()
rng = np.random.default_rng(50)
conn = connectivity.Connectivity(centres=rng.random(size=(no_of_regions, 3)),
region_labels=labels,
weights=rng.random(size=(no_of_regions, no_of_regions)),
Expand Down

0 comments on commit 992c10c

Please sign in to comment.