From: Jean-Philippe ARGAUD Date: Sat, 16 Apr 2022 04:38:02 +0000 (+0200) Subject: Fix for unusual shape behaviors X-Git-Tag: V9_9_0b1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=607bc0594167df28706dd6f24ceb25ace4a6fdbe;p=modules%2Fadao.git Fix for unusual shape behaviors --- diff --git a/src/daComposant/daAlgorithms/Atoms/ecwblue.py b/src/daComposant/daAlgorithms/Atoms/ecwblue.py index 0e62f6a..617c352 100644 --- a/src/daComposant/daAlgorithms/Atoms/ecwblue.py +++ b/src/daComposant/daAlgorithms/Atoms/ecwblue.py @@ -77,12 +77,12 @@ def ecwblue(selfA, Xb, Y, U, HO, CM, R, B, __storeState = False): if Y.size <= Xb.size: _HNHt = numpy.dot(Hm, B @ Ha) _A = R + _HNHt - _u = numpy.linalg.solve( _A , Innovation ) - Xa = Xb + (B @ (Ha @ _u)).reshape((-1,1)) + _u = numpy.linalg.solve( _A , numpy.ravel(Innovation) ) + Xa = Xb + (B @ numpy.ravel(Ha @ _u)).reshape((-1,1)) else: _HtRH = numpy.dot(Ha, RI @ Hm) _A = BI + _HtRH - _u = numpy.linalg.solve( _A , numpy.dot(Ha, RI @ Innovation) ) + _u = numpy.linalg.solve( _A , numpy.ravel(numpy.dot(Ha, RI @ numpy.ravel(Innovation))) ) Xa = Xb + _u.reshape((-1,1)) # if __storeState: selfA._setInternalState("Xn", Xa) diff --git a/src/daComposant/daAlgorithms/Atoms/ecwexblue.py b/src/daComposant/daAlgorithms/Atoms/ecwexblue.py index 8ddefc9..eeb358a 100644 --- a/src/daComposant/daAlgorithms/Atoms/ecwexblue.py +++ b/src/daComposant/daAlgorithms/Atoms/ecwexblue.py @@ -78,12 +78,12 @@ def ecwexblue(selfA, Xb, Y, U, HO, CM, R, B, __storeState = False): if Y.size <= Xb.size: _HNHt = numpy.dot(Hm, B @ Ha) _A = R + _HNHt - _u = numpy.linalg.solve( _A , Innovation ) - Xa = Xb + (B @ (Ha @ _u)).reshape((-1,1)) + _u = numpy.linalg.solve( _A , numpy.ravel(Innovation) ) + Xa = Xb + (B @ numpy.ravel(Ha @ _u)).reshape((-1,1)) else: _HtRH = numpy.dot(Ha, RI @ Hm) _A = BI + _HtRH - _u = numpy.linalg.solve( _A , numpy.dot(Ha, RI @ Innovation) ) + _u = numpy.linalg.solve( _A , numpy.ravel(numpy.dot(Ha, RI @ numpy.ravel(Innovation))) ) Xa = Xb + _u.reshape((-1,1)) # if __storeState: selfA._setInternalState("Xn", Xa)