Skip to content

Commit

Permalink
Adjust n_jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
tsbinns committed Aug 6, 2024
1 parent 30dc4e7 commit 2a9c1e2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions examples/surrogate_connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@

# %%

from multiprocessing import cpu_count

import matplotlib.pyplot as plt
import mne
import numpy as np
from mne.datasets import somato

from mne_connectivity import make_surrogate_data, spectral_connectivity_epochs

n_jobs = cpu_count() // 2

########################################################################################
# Background
# ----------
Expand Down Expand Up @@ -126,7 +122,7 @@
print(f"Computing connectivity for shuffle {shuffle_i+1} of {n_shuffles}")
surrogate_con.append(
spectral_connectivity_epochs(
surrogate, method="imcoh", indices=indices, n_jobs=n_jobs, verbose=False
surrogate, method="imcoh", indices=indices, verbose=False
)
)

Expand Down Expand Up @@ -286,7 +282,7 @@
print(f"Computing connectivity for shuffle {shuffle_i+1} of {n_shuffles}")
bad_surrogate_con.append(
spectral_connectivity_epochs(
surrogate, method="imcoh", indices=indices, n_jobs=n_jobs, verbose=False
surrogate, method="imcoh", indices=indices, verbose=False
)
)

Expand Down

0 comments on commit 2a9c1e2

Please sign in to comment.