Changes in tools/stat.py [d7f24b2:0bdd8d2a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/stat.py
rd7f24b2 r0bdd8d2a 11 11 content = f.readlines() 12 12 content = [x.strip() for x in content] 13 content = [ float(x) for x in content] # expect floating-point strings14 content.remove(max(content)) # need at least 4 data values because15 content.remove(min(content)) # the max and min values are removed16 med = numpy. median(content)17 avg = numpy. mean (content)18 std = numpy. std (content)19 print "median {0 :.1f} avg {1:.1f} stddev {2:.2f}".format( med, avg, std )13 content = [int(x) for x in content] 14 content.remove(max(content)) 15 content.remove(min(content)) 16 med = numpy.around( numpy.median(content), decimals=1) 17 avg = numpy.around( numpy.mean (content), decimals=2) 18 std = numpy.around( numpy.std (content), decimals=2) 19 print "median {0} avg {1} stddev {2}".format( med, avg, std ) 20 20 21 21
Note:
See TracChangeset
for help on using the changeset viewer.