Skip to content

Commit

Permalink
Improve handling of n_jobs=-1
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalobenegas committed Dec 6, 2022
1 parent 6184fd5 commit 5b19f4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions differential_splicing_example.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scquint/differential_splicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _run_differential_splicing(

X = adata.X.toarray() # for easier parallelization using Python's libraries

if n_jobs is not None and n_jobs > 1:
if n_jobs is not None and n_jobs != 1:
dfs_intron_group, dfs_intron = zip(
*Parallel(n_jobs=n_jobs)(
delayed(run_regression)((c, X[:, intron_group_introns[c]], cell_idx_a, cell_idx_b))
Expand Down

0 comments on commit 5b19f4b

Please sign in to comment.