From a2ba1ff7200ad55c342653ccba860df0e8efb9bf Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Tue, 10 Mar 2026 13:19:41 +0100 Subject: [PATCH] fixed old float errors (Fixes #3) --- src/data/MeasurementResult.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/data/MeasurementResult.py b/src/data/MeasurementResult.py index 74f1c30..6fe1e41 100644 --- a/src/data/MeasurementResult.py +++ b/src/data/MeasurementResult.py @@ -168,7 +168,7 @@ class MeasurementResult(Drawable.Drawable, collections.UserDict): sorted array of all dictionary entries without Accumulated Value objects with n==0 """ keys=numpy.array([k for k in list(self.data.keys()) if not (isinstance(self.data[k], AccumulatedValue) and self.data[k].n==0)], - dtype="Float64") + dtype="float32") keys.sort() return keys @@ -177,18 +177,18 @@ class MeasurementResult(Drawable.Drawable, collections.UserDict): def get_xydata(self): k=self.get_xdata() - v=numpy.array([self.data[key].mean() for key in k], dtype="Float64") + v=numpy.array([self.data[key].mean() for key in k], dtype="float64") return [k,v] def get_errorplotdata(self): k=self.get_xdata() - v=numpy.array([self.data[key].mean() for key in k], dtype="Float64") - e=numpy.array([self.data[key].mean_error() for key in k], dtype="Float64") + v=numpy.array([self.data[key].mean() for key in k], dtype="float64") + e=numpy.array([self.data[key].mean_error() for key in k], dtype="float64") return [k,v,e] def get_lineplotdata(self): k=self.get_xdata() - v=numpy.array(self.y, dtype="Float64") + v=numpy.array(self.y, dtype="float64") return [k, v] def uses_statistics(self): @@ -228,9 +228,9 @@ class MeasurementResult(Drawable.Drawable, collections.UserDict): def write_to_hdf(self, hdffile, where, name, title, complib=None, complevel=None): h5_table_format= { - "x" : tables.Float64Col(), - "y" : tables.Float64Col(), - "y_err" : tables.Float64Col(), + "x" : tables.Float32Col(), + "y" : tables.Float32Col(), + "y_err" : tables.Float32Col(), "n" : tables.Int64Col() } filter=None