File size: 240 Bytes
8972ad7
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
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