Skip to content

Commit

Permalink
Fix cpu count detection (#527)
Browse files Browse the repository at this point in the history
* Update __init__.py

* Update CHANGELOG.md
  • Loading branch information
grst authored Jul 9, 2024
1 parent ce5704b commit f036b44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning][].
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
[semantic versioning]: https://semver.org/spec/v2.0.0.html

## v0.17.2

### Fixes

- Detection of CPU count in `define_clonotype_clusters` was broken ([#527](https://github.com/scverse/scirpy/pull/527))

## v0.17.1

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion src/scirpy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,6 @@ def _get_usable_cpus(n_jobs: int = 0):
return n_jobs

try:
return os.sched_getaffinity(0)
return len(os.sched_getaffinity(0))
except AttributeError:
return os.cpu_count()

0 comments on commit f036b44

Please sign in to comment.