update
This commit is contained in:
5
.CondaPkg/env/Lib/collections/__init__.py
vendored
5
.CondaPkg/env/Lib/collections/__init__.py
vendored
@@ -638,7 +638,8 @@ class Counter(dict):
|
||||
>>> sorted(c.elements())
|
||||
['A', 'A', 'B', 'B', 'C', 'C']
|
||||
|
||||
# Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1
|
||||
Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1
|
||||
|
||||
>>> import math
|
||||
>>> prime_factors = Counter({2: 2, 3: 3, 17: 1})
|
||||
>>> math.prod(prime_factors.elements())
|
||||
@@ -679,7 +680,7 @@ class Counter(dict):
|
||||
|
||||
'''
|
||||
# The regular dict.update() operation makes no sense here because the
|
||||
# replace behavior results in the some of original untouched counts
|
||||
# replace behavior results in some of the original untouched counts
|
||||
# being mixed-in with all of the other counts for a mismash that
|
||||
# doesn't have a straight-forward interpretation in most counting
|
||||
# contexts. Instead, we implement straight-addition. Both the inputs
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user