diff options
| author | Scott Gasch <[email protected]> | 2022-03-05 10:15:03 -0800 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-03-05 10:15:03 -0800 |
| commit | d2e437a04124fa3c6e3175205f943769ba443393 (patch) | |
| tree | d38a6201ab72f5ae0b80307d10cf406e15f8d79d /math_utils.py | |
| parent | 0dc52d000262da329728e01444242e35809e107e (diff) | |
Improve text wrapping; add indent option.
Diffstat (limited to 'math_utils.py')
| -rw-r--r-- | math_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/math_utils.py b/math_utils.py index 156862a..49ad407 100644 --- a/math_utils.py +++ b/math_utils.py @@ -74,6 +74,8 @@ class NumericPopulation(object): return self.aggregate / count def get_mode(self) -> Tuple[float, int]: + """Returns the mode (most common member).""" + count: Dict[float, int] = collections.defaultdict(int) for n in self.lowers: count[-n] += 1 |
