CMSIS-DSP: Corrected formatting bug in test script
diff --git a/CMSIS/DSP/Testing/extractDb.py b/CMSIS/DSP/Testing/extractDb.py
index 5ab2ce9..d6179c1 100755
--- a/CMSIS/DSP/Testing/extractDb.py
+++ b/CMSIS/DSP/Testing/extractDb.py
@@ -828,7 +828,10 @@
if args.clamp:
if t > args.clampval:
t = args.clampval
- result.append(("%.3f" % t))
+ if t < 0.0:
+ result.append("NA")
+ else:
+ result.append(("%.3f" % t))
else:
result.append(s)
@@ -854,7 +857,7 @@
if byd:
data=ref.pivot_table(index=toSort, columns=['type'],
- values=["ratio"], aggfunc='first')
+ values=["ratio"], aggfunc='first',fill_value=-1.0)
else:
data=ref.pivot_table(index=toSort, columns=['core'],
values=["ratio"], aggfunc='first')
@@ -868,6 +871,14 @@
dataTable=Table(params,cores)
+ if args.g:
+ if type(dataForFunc) is not pd.DataFrame:
+ sec=Section("Graph")
+ testSection.addSection(sec)
+
+ barChart=BarChart(zip(cores,dataForFunc))
+ sec.addContent(barChart)
+
ratioSection.addContent(Text("A bigger ratio means the reference core \"%s\" is better" % refCoreName))
ratioSection.addContent(dataTable)