From f85e522aefb2309c295150cf228611b2002f1200 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 27 Sep 2017 11:21:54 +0100 Subject: [PATCH] trace: Drop NaNs from CPU active signal in getClusterActiveSignal Some CPUs' active signals may begin earlier than others. In that case, despite the fillna, we may still have NaNs, which break the reduce() call. Therefore just drop rows with NaNs. --- libs/utils/trace.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/utils/trace.py b/libs/utils/trace.py index 93a379e88..c7adabdb3 100644 --- a/libs/utils/trace.py +++ b/libs/utils/trace.py @@ -847,6 +847,10 @@ class Trace(object): ) active.fillna(method='ffill', inplace=True) + # There might be NaNs in the signal where we got data from some CPUs + # before others. That will break the .astype(int) below, so drop rows + # with NaN in them. + active.dropna(inplace=True) # Cluster active is the OR between the actives on each CPU # belonging to that specific cluster -- GitLab