Skip to content

Commit 7e8c93f

Browse files
committed
Use np.int8 for HLL array because its values will never exceed 64
1 parent 834e0a4 commit 7e8c93f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hyperloglog/hll.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __init__(self, error_rate):
9797
self.alpha = get_alpha(p)
9898
self.p = p
9999
self.m = 1 << p
100-
self.M = np.zeros(self.m, int)
100+
self.M = np.zeros(self.m, np.int8)
101101

102102
def __getstate__(self):
103103
return dict([x, getattr(self, x)] for x in self.__slots__)

0 commit comments

Comments
 (0)