stdlib: Remove PyStats Accumulator

This appears to have no equivalent type in the CPP stats and was never
utilized in PyStats.

Change-Id: Ia9afc83b4159eb1ab2c6f44ec0ad86cd73f2a4f8
This commit is contained in:
Bobby R. Bruce
2024-03-27 10:06:38 -07:00
parent 940e1d2063
commit a3af819d82
2 changed files with 0 additions and 39 deletions

View File

@@ -37,7 +37,6 @@ from .group import (
)
from .simstat import SimStat
from .statistic import (
Accumulator,
Distribution,
Scalar,
Statistic,
@@ -74,10 +73,6 @@ class JsonLoader(json.JSONDecoder):
d.pop("type", None)
return Distribution(**d)
elif d["type"] == "Accumulator":
d.pop("type", None)
return Accumulator(**d)
elif d["type"] == "Group":
return Group(**d)

View File

@@ -195,37 +195,3 @@ class Distribution(Vector):
# These check some basic conditions of a distribution.
assert self.bin_size >= 0
assert self.num_bins >= 1
class Accumulator(Vector):
"""
A statistical type representing an accumulator.
"""
_count: int
min: Union[int, float]
max: Union[int, float]
sum_squared: Optional[int]
def __init__(
self,
value: Iterable[Union[int, float]],
count: int,
min: Union[int, float],
max: Union[int, float],
sum_squared: Optional[int] = None,
description: Optional[str] = None,
):
super().__init__(
value=value,
type="Accumulator",
description=description,
)
self._count = count
self.min = min
self.max = max
self.sum_squared = sum_squared
def count(self) -> int:
return self._count