code: def _smooth(aprob, bprob, Ndiff):
      
      gamma, epsilon = _smoothing_parameters(aprob, bprob, Ndiff)
  
      # Remove zeros.
      in_a = [i for i,v in enumerate(aprob) if abs(v) > 0.0]
      aprob = list([list(aprob)[i] for i in in_a])
      bprob = list([list(bprob)[i]*gamma for i in in_a])
  
      # Replace zero values with epsilon.
      bprob = list(map(lambda v: v if v != 0. else epsilon, bprob))
  
      return aprob, bprob
docs: Smooth distributions for KL-divergence according to `Bigi 2003
      <http://link.springer.com/chapter/10.1007%2F3-540-36618-0_22?LI=true>`_.