provide &
and |
operators for MinHash
#1479
Labels
good next issue
An issue that should be ready to resolve.
python
Pull requests that update Python code
In #1474 / #1392, we provide
MinHash.intersection(...)
which joinsMinHash.merge(...)
(equivalent to union).At the time I couldn't figure out how to provide analogs to the set intersection and union operators, which are
&
and|
. @luizirber pointed out that it's as simple as providing__and__
and__or__
onMinHash
classes; see this post for example.To fix this issue,
__and__
and__or__
methods on theMinHash
class;tests/test__minhash.py
that confirms they do the same thing asintersection
and__add__
, respectively;The text was updated successfully, but these errors were encountered: