def smooth_kpss(kpss):
    """
    Adds datapoints where OpenPose has a confidence of 0 using surrounding 
    points.

    Parameters
    ----------
    kpss : numpy.ndarray
        The points to smooth.

    Returns
    -------
    kpss : numpy.ndarray
        The smoothed points.
    """
    kpss = kpss[:,0:8,:];
    for p in range(8):
        if kpss[0][p][2] == 0:
            kpss[0][p] = kpss[1][p];
        if kpss[-1][p][2] == 0:
            kpss[-1][p] = kpss[-2][p];
    for i in range(1,len(kpss)-1):
        for p in range(8):
            if kpss[i][p][2] == 0:
                kpss[i][p][0] = (kpss[i-1][p][0] + kpss[i+1][p][0]) / 2;
                kpss[i][p][1] = (kpss[i-1][p][1] + kpss[i+1][p][1]) / 2;
                kpss[i][p][2] = (kpss[i-1][p][2] + kpss[i+1][p][2]) / 2;
    return kpss;