Commit 9a8ec556 authored by Jakob Knollmüller's avatar Jakob Knollmüller
Browse files

adjoint tests and fix

parent 77692410
Pipeline #103025 failed with stages
in 6 minutes and 43 seconds
......@@ -331,3 +331,23 @@ def testSlowFieldAdapter(seed):
dom = {'a': ift.RGSpace(1), 'b': ift.RGSpace(2)}
op = ift.operators.simple_linear_operators._SlowFieldAdapter(dom, 'a')
ift.extra.check_linear_operator(op)
@pmp('seed', [12, 3])
def testDiagonalExtractor(seed):
N = 42
square_space = ift.RGSpace([N,N])
op = ift.library.variational_models.DiagonalSelector(square_space)
ift.extra.check_linear_operator(op)
@pmp('seed', [12, 3])
def testLowerTriangularInserter(seed):
N = 42
square_space = ift.RGSpace([N,N])
op = ift.library.variational_models.LowerTriangularInserter(square_space)
ift.extra.check_linear_operator(op)
@pmp('seed', [12, 3])
def test_Multifield2Vector(seed):
dom = {'a': ift.RGSpace(1), 'b': ift.RGSpace(2)}
op = ift.Multifield2Vector(dom)
ift.extra.check_linear_operator(op)
\ No newline at end of file
......@@ -33,8 +33,6 @@ def test_lower_triangular_inserter():
myField = ift.from_random(flat_space)
myMatrix = myInserter(myField)
assert_allclose(np_selected, selected)
upper_i = []
upper_j = []
for i in range(0,N):
......
Supports Markdown
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