def normalized(self):
        """Return a normalized version of the histogram where the values sum
        to one.

        """
        total = self.total()
        result = Histogram()
        for value, count in iteritems(self):
            try:
                result[value] = count / float(total)
            except UnorderableElements as e:
                result = Histogram.from_dict(dict(result), key=hash)
                result[value] = count / float(total)
        return result
def normalized ( self ) : total = self . total ( ) result = Histogram ( ) for value , count in iteritems ( self ) : try : result [ value ] = count / float ( total ) except UnorderableElements as e : result = Histogram . from_dict ( dict ( result ) , key = hash ) result [ value ] = count / float ( total ) return result
Return a normalized version of the histogram where the values sum
        to one.