diff options
| author | Scott Gasch <[email protected]> | 2022-02-10 10:38:48 -0800 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-02-10 10:38:48 -0800 |
| commit | 61faaa42ace9ecae318dd93069db743b7d49a0c9 (patch) | |
| tree | c220b6df1617a8b10e336d23915e6ec29dc1822c /histogram.py | |
| parent | d7d135be2f9dbb2d8398d7258f8bac24b4205a2b (diff) | |
Add percentile and change name of RunningMedian class.
Diffstat (limited to 'histogram.py')
| -rw-r--r-- | histogram.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
