countminsketch
countminsketch copied to clipboard
Minor changes for Python 3
It would be good to make a few changes for Python 3.
range
instead of xrange
and print
as a function.
In lines 49 to 56:
for _ in range(d):
table = array.array("l", (0 for _ in range(m)))
self.tables.append(table)
self.salt.append(hash(str(id(table))))
def _hash(self, x):
for s in self.salt:
print (hash((x, s)))
https://github.com/SerialDev/Count-min-sketch-3 Created a new repo due to inactivity. this should work btw