Since this thing is on the innerwebs I suppose it should have a
[python_utils.git] / math_utils.py
index 156862a9c1b55eeec5515efef82f8f951d59b416..dec34f049aa0382823768c53efc2060ae8c69409 100644 (file)
@@ -1,5 +1,7 @@
 #!/usr/bin/env python3
 
+# © Copyright 2021-2022, Scott Gasch
+
 """Mathematical helpers."""
 
 import collections
@@ -74,6 +76,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