summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/dfatool.py2
-rw-r--r--lib/utils.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/dfatool.py b/lib/dfatool.py
index 43e5c9e..c44f4de 100755
--- a/lib/dfatool.py
+++ b/lib/dfatool.py
@@ -523,7 +523,7 @@ class ParamStats:
class TimingData:
"""
- Loader for timing model traces measured with on-board timers.
+ Loader for timing model traces measured with on-board timers using ``harness.OnboardTimerHarness``.
Excpets a specific trace format and UART log output (as produced by
generate-dfa-benchmark.py). Prunes states from output. (TODO)
diff --git a/lib/utils.py b/lib/utils.py
index effbd46..f31aa8e 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -195,11 +195,15 @@ def _corr_by_param(by_name, state_or_trans, attribute, param_index):
param_values = np.array(list((map(lambda x: x[param_index], by_name[state_or_trans]['param']))))
try:
return np.corrcoef(by_name[state_or_trans][attribute], param_values)[0, 1]
- except FloatingPointError as fpe:
+ except FloatingPointError:
# Typically happens when all parameter values are identical.
# Building a correlation coefficient is pointless in this case
# -> assume no correlation
return 0.
+ except ValueError:
+ print('[!] Exception in _corr_by_param(by_name, state_or_trans={}, attribute={}, param_index={})'.format(state_or_trans, attribute, param_index))
+ print('[!] while executing np.corrcoef(by_name[{}][{}]={}, {}))'.format(state_or_trans, attribute, by_name[state_or_trans][attribute], param_values))
+ raise
else:
return 0.