def match(desc1,desc2,threshold=0.5):
    
    n = len(desc1[0])
    
    # pair-wise distances
    d = -ones((len(desc1),len(desc2)))
    for i in range(len(desc1)):
        for j in range(len(desc2)):
            d1 = (desc1[i] - mean(desc1[i])) / std(desc1[i])
            d2 = (desc2[j] - mean(desc2[j])) / std(desc2[j])
            ncc_value = sum(d1 * d2) / (n-1) 
            if ncc_value > threshold:
                d[i,j] = ncc_value
            
    ndx = argsort(-d)
    matchscores = ndx[:,0]
    
    return matchscores
Test is_private_address method works for python3.
dataset/ETHPy150Open jesolem/PCV/PCV/localdescriptors/harris.py/match--crossover with--dataset/ETHPy150Open uber/mutornadomon/tests/test_net.py/TestIsPrivateAddress.test_is_private_address_works_with_python3