'Args:
v(float): a sample
smooth_factor(float):
smooth_radius(int):
Returns:
numpy.ndarray: array of length ``self.nr_bin``, a smoothed one-hot
distribution centered at the bin of sample ``v``.'

def get_distribution(self, v, smooth_factor=0.05, smooth_radius=2):

    b = self.get_bin(v)
    ret = np.zeros((self.nr_bin,), dtype='float32')
    ret[b] = 1.0
    if ((v >= self.maxv) or (v <= self.minv)):
        return ret
    try:
        for k in range(1, (smooth_radius + 1)):
            ret[(b + k)] = (smooth_factor ** k)
    except IndexError:
        pass
    for k in range(1, min((smooth_radius + 1), (b + 1))):
        ret[(b - k)] = (smooth_factor ** k)
    ret /= ret.sum()
    return ret
