def total_error(x, colormap):
    xs = np.reshape(x, (3, 3))
    error_squared = sum([np.linalg.norm(e - np.dot(xs, o)) ** 2 \
                            for o, e in colormap])
    return error_squared ** .5
dataset/ETHPy150Open tanghaibao/jcvi/graphics/grabseeds.py/total_error/swapped operands of `-`