Skip to content

Commit

Permalink
Support hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
padix-key committed Jul 23, 2024
1 parent 04bde76 commit c495c68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/biotite/sequence/align/kmeralphabet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,10 @@ class KmerAlphabet(Alphabet):
return True


def __hash__(self):
return hash((self._base_alph, self._k, tuple(self._spacing.tolist())))


def __len__(self):
return int(len(self._base_alph) ** self._k)

Expand Down

0 comments on commit c495c68

Please sign in to comment.