rafacarrascosa / countminsketch

A minimalistic Count-min Sketch for Python
BSD 3-Clause "New" or "Revised" License
56 stars 32 forks source link

Minor changes for Python 3 #4

Open convexset opened 6 years ago

convexset commented 6 years ago

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)))
SerialDev commented 5 years ago

https://github.com/SerialDev/Count-min-sketch-3 Created a new repo due to inactivity. this should work btw