Skip to content

Commit

Permalink
Merge branch 'gpu_hamming' of https://github.com/felixpetschko/scirpy
Browse files Browse the repository at this point in the history
…into gpu_hamming
  • Loading branch information
felixpetschko committed Feb 7, 2025
2 parents 571bffc + f0c809c commit ad5757e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scirpy/ir_dist/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,9 @@ def _seqs2mat_fast(seqs: Sequence[str], max_len: None | int = None) -> tuple[np.
seqs_mat1, seqs_L1 = _seqs2mat_fast(seqs, max_len=max_seq_len)
seqs_mat2, seqs_L2 = _seqs2mat_fast(seqs2, max_len=max_seq_len)
except UnicodeError:
print(f"UnicodeError error occurred while converting sequences, retrying with implementation for non ascii sequences")
print(
"UnicodeError error occurred while converting sequences, retrying with implementation for non ascii sequences"
)
unique_characters = "".join(sorted({char for string in (*seqs, *seqs2) for char in string}))
seqs_mat1, seqs_L1 = _seqs2mat(seqs, alphabet=unique_characters, max_len=max_seq_len)
seqs_mat2, seqs_L2 = _seqs2mat(seqs2, alphabet=unique_characters, max_len=max_seq_len)
Expand Down

0 comments on commit ad5757e

Please sign in to comment.