From 9bde52d8154beecd89eec978c392627e09122436 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Fri, 20 Sep 2013 13:55:29 +0200 Subject: [PATCH] Minor source corrections --- src/daComposant/daAlgorithms/ExtendedBlue.py | 2 +- src/daComposant/daCore/BasicObjects.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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: -- 2.39.2