Gokul Soumya
feat: Implement binary shield as a library
8972ad7
raw
history blame contribute delete
240 Bytes
import numpy as np
def hamming_distance(bits1: np.ndarray, bits2: np.ndarray) -> int:
return int(np.count_nonzero(bits1 != bits2))
def compute_similarity(bits1: np.ndarray, bits2: np.ndarray) -> float:
raise NotImplementedError