Commit 0dfcda3b authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cosmetics

parent 46c7f781
Pipeline #63100 passed with stages
in 7 minutes and 26 seconds
...@@ -65,6 +65,7 @@ class Squared2NormOperator(EnergyOperator): ...@@ -65,6 +65,7 @@ class Squared2NormOperator(EnergyOperator):
return x.new(val, jac) return x.new(val, jac)
return Field.scalar(x.vdot(x)) return Field.scalar(x.vdot(x))
class QuadraticFormOperator(EnergyOperator): class QuadraticFormOperator(EnergyOperator):
"""Computes the L2-norm of a Field or MultiField with respect to a """Computes the L2-norm of a Field or MultiField with respect to a
specific kernel given by `endo`. specific kernel given by `endo`.
......
...@@ -40,4 +40,3 @@ class Log1p(Operator): ...@@ -40,4 +40,3 @@ class Log1p(Operator):
return res return res
jac = DiagonalOperator(1/(1+xval)) jac = DiagonalOperator(1/(1+xval))
return x.new(res, jac@x.jac) return x.new(res, jac@x.jac)
...@@ -46,10 +46,12 @@ def test_gaussian(field): ...@@ -46,10 +46,12 @@ def test_gaussian(field):
energy = ift.GaussianEnergy(domain=field.domain) energy = ift.GaussianEnergy(domain=field.domain)
ift.extra.check_jacobian_consistency(energy, field) ift.extra.check_jacobian_consistency(energy, field)
def test_studentt(field): def test_studentt(field):
energy = ift.StudentTEnergy(domain=field.domain, theta=.5) energy = ift.StudentTEnergy(domain=field.domain, theta=.5)
ift.extra.check_jacobian_consistency(energy, field, tol=1e-6) ift.extra.check_jacobian_consistency(energy, field, tol=1e-6)
def test_inverse_gamma(field): def test_inverse_gamma(field):
field = field.exp() field = field.exp()
space = field.domain space = field.domain
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment