File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 37
37
from __future__ import print_function
38
38
39
39
import subprocess
40
- import numpy
41
40
import re
42
41
import os
43
42
import sys
44
43
import argparse
44
+ import math
45
+
46
+
47
+ # Calculate the population standard deviation
48
+ def pstdev (l ):
49
+ return (sum ((x - sum (l ) / float (len (l ))) ** 2 for x in l ) / len (l )) ** 0.5
45
50
46
51
47
52
class SwiftBenchHarness :
@@ -348,8 +353,8 @@ def Process(self):
348
353
self .minimum = min (self .samples )
349
354
self .maximum = max (self .samples )
350
355
self .avg = sum (self .samples )/ len (self .samples )
351
- self .std = numpy . std (self .samples )
352
- self .err = self .std / numpy .sqrt (len (self .samples ))
356
+ self .std = pstdev (self .samples )
357
+ self .err = self .std / math .sqrt (len (self .samples ))
353
358
self .int_min = self .avg - self .err * 1.96
354
359
self .int_max = self .avg + self .err * 1.96
355
360
def Print (self ):
You can’t perform that action at this time.
0 commit comments