Home | History | Annotate | Download | only in python2.7

Lines Matching full:counts

383     or multiset.  Elements are stored as dictionary keys and their counts
394 >>> sum(c.values()) # total of all counts
399 >>> for elem in 'shazam': # update counts from an iterable
435 of elements to their counts.
452 '''List the n most common elements and their counts from the most
453 common to the least. If n is None, then list all element counts.
496 '''Like dict.update() but add counts instead of replacing them.
509 # replace behavior results in the some of original untouched counts
510 # being mixed-in with all of the other counts for a mismash that
513 # and outputs are allowed to contain zero and negative counts.
531 '''Like dict.update() but subtracts counts instead of replacing them.
532 Counts can be reduced below zero. Both the inputs and outputs are
533 allowed to contain zero and negative counts.
579 # Outputs guaranteed to only include positive counts.
581 # To strip negative and zero counts, add-in an empty counter:
585 '''Add counts from two counters.
604 ''' Subtract count, but keep only results with positive counts.
643 ''' Intersection is the minimum of corresponding counts.