import numpy
print info, numpy.nanvar(var[-1])
+.. index:: single: ValueL2Norm (Observer)
+
+Template **ValueL2Norm** :
+..........................
+
+Print on standard output the L2 norm of the current value of the variable.
+
+::
+
+ import numpy
+ v = numpy.matrix( numpy.ravel( var[-1] ) )
+ print info, float( numpy.linalg.norm(v) )
+
.. index:: single: ValueRMS (Observer)
Template **ValueRMS** :
import numpy
print info, numpy.nanvar(var[-1])
+.. index:: single: ValueL2Norm (Observer)
+
+Modèle **ValueL2Norm** :
+........................
+
+Imprime sur la sortie standard la norme L2 de la valeur courante de la variable.
+
+::
+
+ import numpy
+ v = numpy.matrix( numpy.ravel( var[-1] ) )
+ print info, float( numpy.linalg.norm(v) )
+
.. index:: single: ValueRMS (Observer)
Modèle **ValueRMS** :
en_EN = "Print on standard output the variance of the current value of the variable",
order = "next",
)
+ObserverTemplates.store(
+ name = "ValueL2Norm",
+ content = """import numpy\nv = numpy.matrix( numpy.ravel( var[-1] ) )\nprint info, float( numpy.linalg.norm(v) )""",
+ fr_FR = "Imprime sur la sortie standard la norme L2 de la valeur courante de la variable",
+ en_EN = "Print on standard output the L2 norm of the current value of the variable",
+ order = "next",
+ )
ObserverTemplates.store(
name = "ValueRMS",
content = """import numpy\nv = numpy.matrix( numpy.ravel( var[-1] ) )\nprint info, float( numpy.sqrt((1./v.size)*(v*v.T)) )""",