code: def Log(self, m=None):
          
          if self.log:
              raise ValueError("Pmf/Hist already under a log transform")
          self.log = True
  
          if m is None:
              m = self.MaxLike()
  
          for x, p in self.d.iteritems():
              if p:
                  self.Set(x, math.log(p / m))
              else:
                  self.Remove(x)
docs: Log transforms the probabilities.
          
          Removes values with probability 0.
  
          Normalizes so that the largest logprob is 0.