def distance(a, b):
    def _difference(a, b):
        if a > b: return a - b
        elif b > a: return b - a
        else: return 0

    assert len(a) == len(b)
    dist = 0
    for i in range(0, len(a)):
        dist += _difference(a[i], b[i])
    return dist
dataset/ETHPy150Open charlienewey/image-mosaic/mosaic/colour-mosaic.py/distance/original