diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-01-14 14:55:28 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-01-14 14:55:28 +0100 |
commit | 3b3d166b266a6467591e1617a8856b211d9006ca (patch) | |
tree | 8d9c66117da39c769ad18f16dc355543e230bbef | |
parent | 2fbaeecc98b0cc7ed2ec436a15b4d60bebc694a3 (diff) |
energytrace drift compensation: partially handle lack of candidates
-rw-r--r-- | lib/lennart/DataProcessor.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/lennart/DataProcessor.py b/lib/lennart/DataProcessor.py index 23e6766..7c161ab 100644 --- a/lib/lennart/DataProcessor.py +++ b/lib/lennart/DataProcessor.py @@ -291,8 +291,10 @@ class DataProcessor: delta_drift = np.abs(prev_drift - new_drift) csr_weights.append(delta_drift) - prev_nodes = new_nodes - prev_drifts = new_drifts + # a transition's candidate list may be empty + if len(new_nodes): + prev_nodes = new_nodes + prev_drifts = new_drifts # add an end node for shortest path search # (end node == final sync, so drift == 0) |