# Calcul de la covariance d'analyse
# ---------------------------------
if "APosterioriCovariance" in self._parameters["StoreSupplementaryCalculations"]:
- Ht = H["Tangent"].asMatrix(ValueForMethodForm = Xa)
- Ht = Ht.reshape(-1,len(Xa.A1)) # ADAO
+ HtM = H["Tangent"].asMatrix(ValueForMethodForm = Xa)
+ HtM = HtM.reshape(len(Y),len(Xa.A1)) # ADAO & check shape
+ HaM = H["Adjoint"].asMatrix(ValueForMethodForm = Xa)
+ HaM = HaM.reshape(len(Xa.A1),len(Y)) # ADAO & check shape
HessienneI = []
nb = len(Xa.A1)
for i in range(nb):
_ee = numpy.matrix(numpy.zeros(nb)).T
_ee[i] = 1.
- _HtEE = Ht * _ee
+ _HtEE = numpy.dot(HtM,_ee)
_HtEE = numpy.asmatrix(numpy.ravel( _HtEE )).T
- HessienneI.append( ( BI*_ee + Ha((Xa,RI*_HtEE)) ).A1 )
+ HessienneI.append( numpy.ravel( numpy.dot(BI,_ee) + numpy.dot(HaM,numpy.dot(RI,_HtEE)) ) )
HessienneI = numpy.matrix( HessienneI )
A = HessienneI.I
if min(A.shape) != max(A.shape):