hashfunc to replace hashobj
Now support hashfunc
parameter for MinHash and HyperLogLog. The old parameter hashobj
is removed.
# Let's use MurmurHash3.
import mmh3
# We need to define a new hash function that outputs an integer that
# can be encoded in 32 bits.
def _hash_func(d):
return mmh3.hash32(d)
# Use this function in MinHash constructor.
m = MinHash(hashfunc=_hash_func)