Skip to content

Commit

Permalink
Merge pull request #51 from omicsedge/fix/stable-sorting
Browse files Browse the repository at this point in the history
fix: sort stable
  • Loading branch information
sandra-selfdecode authored Dec 23, 2024
2 parents d1befbf + 829555b commit 07e59a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def get_row_matches(self, row: int) -> np.ndarray:
self.normed[self.row_indices[row]] >= self.threshold[row]
]
haps = np.searchsorted(self.indptr, match_indices, side="right") - 1
return haps[np.argsort(self.normed[match_indices])[::-1]]
return haps[np.argsort(self.normed[match_indices], kind="stable")[::-1]]

def get_hap_matches(self, hap: int) -> Iterable[Tuple[int]]:
"""Return tuples with ends of hap matches"""
Expand Down

0 comments on commit 07e59a0

Please sign in to comment.