From 6628db819271080b47d595640688f3e3ac725551 Mon Sep 17 00:00:00 2001 From: "rupesh.kumar" <57129475+rupeshkumaar@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:17:09 +0530 Subject: [PATCH] Merging (Identically Specified) MinHashLSH objects Fixes #205 --- datasketch/lsh.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datasketch/lsh.py b/datasketch/lsh.py index 069e23b..2f1c9b4 100644 --- a/datasketch/lsh.py +++ b/datasketch/lsh.py @@ -304,13 +304,14 @@ def _insert( def __equivalent(self, other:MinHashLSH) -> bool: """ Returns: - bool: If the two MinHashLSH has equal num_perm, band size and size of each bands then two are equivalent. + bool: If the two MinHashLSH have equal num_perm, number of bands, size of each band and hashfunc (if provided) then two are equivalent. """ return ( type(self) is type(other) and self.h == other.h and self.b == other.b and - self.r == other.r + self.r == other.r and + type(self.hashfunc) == type(other.hashfunc) ) def _merge(