Permalink
Browse files

Added common.movingaverage.MovingAverage.verbose_string

  • Loading branch information...
1 parent f3b2f28 commit b530d9506cf0f37dd3f1337fdb2198b6e19000bd @turian committed Sep 18, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 movingaverage.py
View
@@ -49,3 +49,8 @@ def __str__(self):
return "(moving average): mean=%.3f%% stddev=%.3f" % (self.mean, math.sqrt(self.variance))
else:
return "(moving average): mean=%.3f stddev=%.3f" % (self.mean, math.sqrt(self.variance))
+ def verbose_string(self):
+ if self.percent:
+ return "(moving average): mean=%g%% stddev=%g" % (self.mean, math.sqrt(self.variance))
+ else:
+ return "(moving average): mean=%g stddev=%g" % (self.mean, math.sqrt(self.variance))

0 comments on commit b530d95

Please sign in to comment.