From 0d9ebc2e362cd4acc162d291aac63c345044c8ff Mon Sep 17 00:00:00 2001 From: Lukas Auer Date: Mon, 23 May 2022 17:40:25 +0200 Subject: [PATCH] Fix unintended cast of large integer registers to floats The call to pandas.concat in write_output_wrt_goldenrun() causes large integer registers values to be cast to floats. Since the register values do not have to be deduplicated, do not process them with write_output_wrt_goldenrun(). See also #41 and #42 --- faultclass.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/faultclass.py b/faultclass.py index fb00ef9..1f182c3 100644 --- a/faultclass.py +++ b/faultclass.py @@ -525,9 +525,12 @@ def readout_data( for (flag, keyword, data) in datasets: if not flag: continue - output[keyword] = write_output_wrt_goldenrun( - keyword, data, goldenrun_data - ) + if keyword.endswith("registers"): + output[keyword] = data.to_dict("records") + else: + output[keyword] = write_output_wrt_goldenrun( + keyword, data, goldenrun_data + ) if tbfaulted == 1: output["tbfaulted"] = tbfaultedlist