def l0_norm(x, y):
    """
    L0 norm of two images x and y (used to compute tau)
    :param x:
    :param y:
    :return: l0 norm
    """
    return np.linalg.norm(x.flatten() - y.flatten(), 0)


# ------------------------------------------------------------------------------------------------------------------
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/msct_gmseg_utils.py/l0_norm/original