# -*- coding: utf-8 -*-
#
-# Copyright (C) 2008-2019 EDF R&D
+# Copyright (C) 2008-2020 EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
import gzip, bz2
from daCore.PlatformInfo import PathManagement ; PathManagement()
-from daCore.PlatformInfo import has_gnuplot
+from daCore.PlatformInfo import has_gnuplot, PlatformInfo
+mfp = PlatformInfo().MaximumPrecision()
if has_gnuplot:
import Gnuplot
"x.__len__() <==> len(x)"
return len(self.__values)
+ def name(self):
+ return self.__name
+
def __getitem__(self, index=None ):
"x.__getitem__(y) <==> x[y]"
return copy.copy(self.__values[index])
élémentaires numpy.
"""
try:
- return [numpy.array(item).mean() for item in self.__values]
+ return [numpy.mean(item, dtype=mfp) for item in self.__values]
except:
raise TypeError("Base type is incompatible with numpy")
"""
try:
if self.__basetype in [int, float]:
- return float( numpy.array(self.__values).mean() )
+ return float( numpy.mean(self.__values, dtype=mfp) )
else:
- return numpy.array(self.__values).mean(axis=0)
+ return numpy.mean(self.__values, axis=0, dtype=mfp)
except:
raise TypeError("Base type is incompatible with numpy")