From: Jean-Philippe ARGAUD Date: Fri, 20 Sep 2013 11:55:29 +0000 (+0200) Subject: Minor source corrections X-Git-Tag: V7_3_0~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9bde52d8154beecd89eec978c392627e09122436;p=modules%2Fadao.git Minor source corrections --- diff --git a/src/daComposant/daAlgorithms/ExtendedBlue.py b/src/daComposant/daAlgorithms/ExtendedBlue.py index c4085c5..196b526 100644 --- a/src/daComposant/daAlgorithms/ExtendedBlue.py +++ b/src/daComposant/daAlgorithms/ExtendedBlue.py @@ -54,7 +54,6 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): # # Opérateur d'observation # ----------------------- - H = HO["Direct"].appliedTo Hm = HO["Tangent"].asMatrix(Xb) Hm = Hm.reshape(Y.size,Xb.size) # ADAO & check shape Ha = HO["Adjoint"].asMatrix(Xb) @@ -65,6 +64,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): if HO["AppliedToX"] is not None and HO["AppliedToX"].has_key("HXb"): HXb = HO["AppliedToX"]["HXb"] else: + H = HO["Direct"].appliedTo HXb = H( Xb ) HXb = numpy.asmatrix(numpy.ravel( HXb )).T # diff --git a/src/daComposant/daCore/BasicObjects.py b/src/daComposant/daCore/BasicObjects.py index dc5a466..7a58d23 100644 --- a/src/daComposant/daCore/BasicObjects.py +++ b/src/daComposant/daCore/BasicObjects.py @@ -360,12 +360,12 @@ class Covariance: self.__is_matrix = False if asEyeByScalar is not None: self.__is_scalar = True - self.__B = float(asEyeByScalar) + self.__B = numpy.abs( float(asEyeByScalar) ) self.shape = (0,0) self.size = 0 elif asEyeByVector is not None: self.__is_vector = True - self.__B = numpy.array( numpy.ravel( asEyeByVector ), float ) + self.__B = numpy.abs( numpy.array( numpy.ravel( asEyeByVector ), float ) ) self.shape = (self.__B.size,self.__B.size) self.size = self.__B.size**2 elif asCovariance is not None: