X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=histogram.py;h=dd47319cba845687deefe0c7f72de0e24f8e1500;hb=2e8dd08f5f4f9624facf4d38ea6b276cc8131f56;hp=9c07df9b588aef626ecf8217a70ac4fd9676eb9d;hpb=a4b50bb62e2653d3d084c6c7e0574abb9277b8d7;p=python_utils.git diff --git a/histogram.py b/histogram.py index 9c07df9..dd47319 100644 --- a/histogram.py +++ b/histogram.py @@ -32,7 +32,7 @@ class SimpleHistogram(Generic[T]): NEGATIVE_INFINITY = -math.inf def __init__(self, buckets: List[Tuple[Bound, Bound]]): - from math_utils import RunningMedian + from math_utils import NumericPopulation self.buckets: Dict[Tuple[Bound, Bound], Count] = {} for start_end in buckets: @@ -40,7 +40,7 @@ class SimpleHistogram(Generic[T]): raise Exception("Buckets overlap?!") self.buckets[start_end] = 0 self.sigma: float = 0.0 - self.stats: RunningMedian = RunningMedian() + self.stats: NumericPopulation = NumericPopulation() self.maximum: Optional[T] = None self.minimum: Optional[T] = None self.count: Count = 0