def get_proportion_of_reconstructions_with_same_codes(data, model):
    N = data.shape[0]

    # Compute coarse codes for data
    count = 0
    for d in data:
        c1 = model.predict(d)
        r = model.reconstruct(c1)
        c2 = model.predict(r)
        if c1 == c2:
            count += 1

    return N / float(count)
dataset/ETHPy150Open yahoo/lopq/python/lopq/eval.py/get_proportion_of_reconstructions_with_same_codes/swapped operands of `/`