Skip to content

Commit 6628db8

Browse files
committed
Merging (Identically Specified) MinHashLSH objects
Fixes #205
1 parent d96b6e7 commit 6628db8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

datasketch/lsh.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,14 @@ def _insert(
304304
def __equivalent(self, other:MinHashLSH) -> bool:
305305
"""
306306
Returns:
307-
bool: If the two MinHashLSH has equal num_perm, band size and size of each bands then two are equivalent.
307+
bool: If the two MinHashLSH have equal num_perm, number of bands, size of each band and hashfunc (if provided) then two are equivalent.
308308
"""
309309
return (
310310
type(self) is type(other) and
311311
self.h == other.h and
312312
self.b == other.b and
313-
self.r == other.r
313+
self.r == other.r and
314+
type(self.hashfunc) == type(other.hashfunc)
314315
)
315316

316317
def _merge(

0 commit comments

Comments
 (0)