Skip to content
Snippets Groups Projects
Commit 694d61dc authored by Martin Reinecke's avatar Martin Reinecke
Browse files

bug fixes and new test

parent 94d60caa
Branches
Tags
No related merge requests found
......@@ -45,7 +45,7 @@ class VdotOperator(LinearOperator):
class SumReductionOperator(LinearOperator):
def __init__(self, domain):
self._domain = domain
self._domain = DomainTuple.make(domain)
self._target = DomainTuple.scalar_domain()
self._capability = self.TIMES | self.ADJOINT_TIMES
......@@ -58,7 +58,7 @@ class SumReductionOperator(LinearOperator):
class ConjugationOperator(EndomorphicOperator):
def __init__(self, domain):
self._domain = domain
self._domain = DomainTuple.make(domain)
self._capability = self._all_ops
def apply(self, x, mode):
......@@ -68,7 +68,7 @@ class ConjugationOperator(EndomorphicOperator):
class Realizer(EndomorphicOperator):
def __init__(self, domain):
self._domain = domain
self._domain = DomainTuple.make(domain)
self._capability = self.TIMES | self.ADJOINT_TIMES
def apply(self, x, mode):
......
......@@ -65,6 +65,12 @@ class Consistency_Tests(unittest.TestCase):
dtype=dtype))
ift.extra.consistency_check(op, dtype, dtype)
@expand(product(_h_spaces + _p_spaces + _pow_spaces,
[np.float64, np.complex128]))
def testSumReductionOperator(self, sp, dtype):
op = ift.SumReductionOperator(sp)
ift.extra.consistency_check(op, dtype, dtype)
@expand(product([(ift.RGSpace(10, harmonic=True), 4, 0),
(ift.RGSpace((24, 31), distances=(0.4, 2.34),
harmonic=True), 3, 0),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment