Show More
@@ -91,14 +91,8 b' class TimeitResult(object):' | |||
|
91 | 91 | return (math.fsum([(x - mean) ** 2 for x in self.timings]) / len(self.timings)) ** 0.5 |
|
92 | 92 | |
|
93 | 93 | def __str__(self): |
|
94 | if self.loops == 1: # No s at "loops" if only one loop | |
|
95 | return (u"%s loop, average of %d: %s +- %s per loop (using standard deviation)" | |
|
96 | % (self.loops, self.repeat, | |
|
97 | _format_time(self.average, self._precision), | |
|
98 | _format_time(self.stdev, self._precision))) | |
|
99 | else: | |
|
100 | return (u"%s loops, average of %d: %s +- %s per loop (using standard deviation)" | |
|
101 | % (self.loops, self.repeat, | |
|
94 | return (u"%s loop%s, average of %d: %s +- %s per loop (using standard deviation)" | |
|
95 | % (self.loops,"" if self.loops == 1 else "s", self.repeat, | |
|
102 | 96 |
|
|
103 | 97 |
|
|
104 | 98 |
General Comments 0
You need to be logged in to leave comments.
Login now