find_dupes: build aHash matrix as uint64 before xor (int64 array ctor overflows)
This commit is contained in:
+2
-2
@@ -134,8 +134,8 @@ def main():
|
|||||||
# 'same show, different shot'.
|
# 'same show, different shot'.
|
||||||
close = ham <= args.max_dist
|
close = ham <= args.max_dist
|
||||||
|
|
||||||
amat = np.array([data[f][1] for f in names], dtype=np.int64)
|
amat = np.array([data[f][1] for f in names], dtype=np.uint64)
|
||||||
xa = (amat[:, None] ^ amat[None, :])
|
xa = (amat[:, None] ^ amat[None, :]).astype(np.int64)
|
||||||
aham = np.zeros(xa.shape, dtype=np.int16)
|
aham = np.zeros(xa.shape, dtype=np.int16)
|
||||||
for b in range(64):
|
for b in range(64):
|
||||||
aham += ((xa >> b) & 1).astype(np.int16)
|
aham += ((xa >> b) & 1).astype(np.int16)
|
||||||
|
|||||||
Reference in New Issue
Block a user