We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e99ead commit 3284569Copy full SHA for 3284569
1 file changed
machine_learning/min_hash.py
@@ -17,7 +17,7 @@
17
18
def _token_hash(token: str, seed: int, permutation: int) -> int:
19
"""Return a deterministic 64-bit hash for one token and permutation."""
20
- payload = f"{seed}:{permutation}:{token}".encode("utf-8")
+ payload = f"{seed}:{permutation}:{token}".encode()
21
return int.from_bytes(hashlib.blake2b(payload, digest_size=8).digest(), "big")
22
23
0 commit comments