Closed ascv closed 4 years ago
import HLL h = HLL.HyperLogLog(3) b = bytearray(8) b[0] = 1 b[7] = 1 print('Using bytearray') h.set_registers(b) print(map(int, h.registers())) print('Using bytes') b[1] = 1 b[6] = 1 h.set_registers(bytes(b)) print(map(int, h.registers())) # 2.7.x ValueError, 3.x TypeError h.set_registers('aaaaaaaa')