]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Minor corrections
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Wed, 19 Jun 2019 13:31:37 +0000 (15:31 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Wed, 19 Jun 2019 13:31:37 +0000 (15:31 +0200)
bin/AdaoCatalogGenerator.py
resources/ADAOSchemaCatalog.xml
src/daComposant/daCore/Persistence.py

index 406de4fe9a9a55a5c32ba5ea0a6559870abe2ad9..ed2c5f11ef12aa64dcbb911b1c5e811cbc032aa2 100644 (file)
@@ -320,6 +320,7 @@ CHECKING_STUDY = PROC(nom="CHECKING_STUDY",
     Debug               = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0),
     AlgorithmParameters = F_AlgorithmParameters("o", ({check_names}), AlgorithmParametersInNS),
     CheckingPoint       = F_CheckingPoint("o", CheckingPointInNS),
+    Background          = F_Background("f", BackgroundInNS),
     BackgroundError     = F_BackgroundError("f", BackgroundErrorInNS),
     Observation         = F_Observation("f", ObservationInNS),
     ObservationError    = F_ObservationError("f", ObservationErrorInNS),
index 5d0c3782367e938a8d8f55a48f2cade4127cea34..0b7d4d5ad9ab4d4bbea7d1e4f950bf7e386e472e 100644 (file)
@@ -434,10 +434,11 @@ if (vector_in_string.find("array")>-1) or (vector_in_string.find("matrix")>-1):
     vector_in_string=vector_in_string.replace("array","numpy.array")
     vector_in_string=vector_in_string.replace("matrix","numpy.matrix")
     exec("vector="+vector_in_string)
-    vector = numpy.matrix(vector)
+    vector = numpy.array(vector)
 else:
     vector_in_string=vector_in_string.replace("'","").replace('"','')
-    vector = numpy.matrix(vector_in_string)
+    vector_in_list = eval(str(vector_in_string),{},{})
+    vector = numpy.array(vector_in_list)
 type = "VectorSerie"
 logging.debug("VectorSerie is %s"%vector)
 ]]></code></script>
index ec1f2806fdd7752f65c79c7ea9c3dbf3aae12e8e..36d2fc5ddc6f019f2388f499ecd50502f96ebb87 100644 (file)
@@ -31,7 +31,8 @@ import os, sys, numpy, copy
 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
 
@@ -276,7 +277,7 @@ class Persistence(object):
         é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")
 
@@ -469,9 +470,9 @@ class Persistence(object):
         """
         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")