Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed May 29, 2024
1 parent b2e28f7 commit 3b8eabc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/spikeinterface/preprocessing/whiten.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ def compute_whitening_matrix(
regularize_kwargs["assume_centered"] = True
job_kwargs = get_global_job_kwargs()
if "n_jobs" in job_kwargs and "n_jobs" not in regularize_kwargs:
regularize_kwargs["n_jobs"] = job_kwargs["n_jobs"]
n_jobs = job_kwargs["n_jobs"]
if isinstance(n_jobs, float) and 0 < n_jobs <= 1:
import os
n_jobs = int(n_jobs * os.cpu_count())
regularize_kwargs["n_jobs"] = n_jobs
estimator = sklearn.covariance.GraphicalLassoCV(**regularize_kwargs)
estimator.fit(data)
cov = estimator.covariance_
Expand Down

0 comments on commit 3b8eabc

Please sign in to comment.