Inaccurate principal curvature near peaks

I am setting those points to zero. Code snippet below. I do not think those points belong to the case of H^2 - K < 0

    AA = np.square(curvature_np['Mean_Curvature']) - curvature_np['Gauss_Curvature']
    if not np.alltrue(AA>=0):
        logging.warning(f'{np.count_nonzero(AA<0)} values below-sqrt is not non-negative!')
    BB = np.sqrt(AA)
    BB[AA<0] = 0
    curvature_np['Max_Curv_NP'] = curvature_np['Mean_Curvature'] + BB
    curvature_np['Min_Curv_NP'] = curvature_np['Mean_Curvature'] - BB