'Returns the kernel smoothing estimate for point x based on x-values
xs and y-values ys.
Not expected to be called by the user.'

def smooth(self, xs, ys, x):

    (xs, ys) = self.in_domain(xs, ys, x)
    if (len(xs) > 0):
        w = np.sum(self(((xs - x) / self.h)))
        v = np.sum([(yy * self(((xx - x) / self.h))) for (xx, yy) in zip(xs, ys)])
        return (v / w)
    else:
        return np.nan
