From: Jean-Philippe ARGAUD Date: Wed, 5 Jun 2013 13:50:23 +0000 (+0200) Subject: Improving size checking and conversions X-Git-Tag: V7_3_0~46 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=15e0832bc3e1f2a74c83f42b91b6dce389641920;p=modules%2Fadao.git Improving size checking and conversions --- diff --git a/src/daComposant/daAlgorithms/EnsembleBlue.py b/src/daComposant/daAlgorithms/EnsembleBlue.py index 8643cf1..7fe31fb 100644 --- a/src/daComposant/daAlgorithms/EnsembleBlue.py +++ b/src/daComposant/daAlgorithms/EnsembleBlue.py @@ -78,7 +78,9 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): # Initialisation des opérateurs d'observation et de la matrice gain # ----------------------------------------------------------------- Hm = HO["Tangent"].asMatrix(None) + Hm = Hm.reshape(Y.size,Xb[0].size) # ADAO & check shape Ha = HO["Adjoint"].asMatrix(None) + Ha = Ha.reshape(Xb[0].size,Y.size) # ADAO & check shape # # Calcul de la matrice de gain dans l'espace le plus petit et de l'analyse # ------------------------------------------------------------------------ diff --git a/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py b/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py index 775f7b4..65a7916 100644 --- a/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py +++ b/src/daComposant/daAlgorithms/ExtendedKalmanFilter.py @@ -152,6 +152,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): if self._parameters["EstimationOf"] == "State": Xn_predicted = numpy.asmatrix(numpy.ravel( M( (Xn, Un) ) )).T if Cm is not None and Un is not None: # Attention : si Cm est aussi dans M, doublon ! + Cm = Cm.reshape(Xn.size,Un.size) # ADAO & check shape Xn_predicted = Xn_predicted + Cm * Un Pn_predicted = Mt * Pn * Ma + Q elif self._parameters["EstimationOf"] == "Parameters":