diff options
Diffstat (limited to 'wqflask/utility')
-rw-r--r-- | wqflask/utility/corestats.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/wqflask/utility/corestats.py b/wqflask/utility/corestats.py index c48183ed..67ca3ad3 100644 --- a/wqflask/utility/corestats.py +++ b/wqflask/utility/corestats.py @@ -23,47 +23,33 @@ class Stats: # convert all items to floats for numerical processing self.sequence = [float(item) for item in sequence] - def sum(self): if len(self.sequence) < 1: return None else: return sum(self.sequence) - def count(self): return len(self.sequence) - def min(self): if len(self.sequence) < 1: return None else: return min(self.sequence) - def max(self): if len(self.sequence) < 1: return None else: return max(self.sequence) - def avg(self): if len(self.sequence) < 1: return None else: return sum(self.sequence) / len(self.sequence) - - def median(self): - if len(self.sequence) < 1: - return None - else: - self.sequence.sort() - return self.sequence[len(self.sequence) // 2] - - def stdev(self): if len(self.sequence) < 1: return None @@ -73,7 +59,6 @@ class Stats: stdev = (sdsq / (len(self.sequence) - 1)) ** .5 return stdev - def percentile(self, percentile): if len(self.sequence) < 1: value = None @@ -86,7 +71,6 @@ class Stats: value = self.sequence[element_idx] return value - # Sample script using this class: # ------------------------------------------- # #!/usr/bin/env python |