Skip to content

Commit

Permalink
fix usage of random sample to be compatible with python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMainguy committed Aug 22, 2024
1 parent 9abb654 commit 1109ceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ppanggolin/nem/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def evaluate_nb_partitions(organisms: set, output: Path = None, sm_degree: int =
newtmpdir = tmpdir / "eval_partitions"

if len(organisms) > chunk_size:
select_organisms = set(random.sample(set(organisms), chunk_size))
select_organisms = set(random.sample(list(organisms), chunk_size))
else:
select_organisms = set(organisms)

Expand Down

0 comments on commit 1109ceb

Please sign in to comment.