Changeset d7f24b2
- Timestamp:
- Jun 23, 2019, 3:59:46 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- fe065c3
- Parents:
- aca144e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/stat.py
raca144e rd7f24b2 11 11 content = f.readlines() 12 12 content = [x.strip() for x in content] 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 )13 content = [float(x) for x in content] # expect floating-point strings 14 content.remove(max(content)) # need at least 4 data values because 15 content.remove(min(content)) # the max and min values are removed 16 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 ) 20 20 21 21
Note: See TracChangeset
for help on using the changeset viewer.