# --- > Par principe, M = Id, Q = 0
Xn_predicted = Xn
#
- Xfm = numpy.asmatrix(numpy.ravel(Xn_predicted.mean(axis=1, dtype=mfp))).T
- Hfm = numpy.asmatrix(numpy.ravel(HX_predicted.mean(axis=1, dtype=mfp))).T
+ Xfm = numpy.asmatrix(numpy.ravel(Xn_predicted.mean(axis=1, dtype=mfp).astype('float'))).T
+ Hfm = numpy.asmatrix(numpy.ravel(HX_predicted.mean(axis=1, dtype=mfp).astype('float'))).T
#
PfHT, HPfHT = 0., 0.
for i in range(__m):
ri = numpy.asmatrix(numpy.random.multivariate_normal(numpy.zeros(__p), Rn, (1,1,1))).T
Xn[:,i] = Xn_predicted[:,i] + K * (Ynpu + ri - HX_predicted[:,i])
#
- Xa = Xn.mean(axis=1, dtype=mfp)
+ Xa = Xn.mean(axis=1, dtype=mfp).astype('float')
#
if self._parameters["StoreInternalVariables"] \
or self._toStore("CostFunctionJ") \
élémentaires numpy.
"""
try:
- return [numpy.mean(item, dtype=mfp) for item in self.__values]
+ return [numpy.mean(item, dtype=mfp).astype('float') for item in self.__values]
except:
raise TypeError("Base type is incompatible with numpy")
"""
try:
if numpy.version.version >= '1.1.0':
- return [numpy.array(item).std(ddof=ddof) for item in self.__values]
+ return [numpy.array(item).std(ddof=ddof, dtype=mfp).astype('float') for item in self.__values]
else:
- return [numpy.array(item).std() for item in self.__values]
+ return [numpy.array(item).std(dtype=mfp).astype('float') for item in self.__values]
except:
raise TypeError("Base type is incompatible with numpy")
les types élémentaires numpy.
"""
try:
- if self.__basetype in [int, float]:
- return float( numpy.mean(self.__values, dtype=mfp) )
- else:
- return numpy.mean(self.__values, axis=0, dtype=mfp)
+ return numpy.mean(self.__values, axis=0, dtype=mfp).astype('float')
except:
raise TypeError("Base type is incompatible with numpy")
"""
try:
if numpy.version.version >= '1.1.0':
- return numpy.array(self.__values).std(ddof=ddof,axis=0)
+ return numpy.array(self.__values).std(ddof=ddof,axis=0).astype('float')
else:
- return numpy.array(self.__values).std(axis=0)
+ return numpy.array(self.__values).std(axis=0).astype('float')
except:
raise TypeError("Base type is incompatible with numpy")