diff --git a/nifty6/field.py b/nifty6/field.py index ee52227566f12779b788b83ef2d57cbf973a2a63..f04a7a05ecae3e6772ec1d50962f931874a7d07b 100644 --- a/nifty6/field.py +++ b/nifty6/field.py @@ -283,7 +283,7 @@ class Field(Operator): raise TypeError("The multiplier must be an instance of " + "the Field class") from .operators.outer_product_operator import OuterProduct - return OuterProduct(self, x.domain)(x) + return OuterProduct(x.domain, self)(x) def vdot(self, x, spaces=None): """Computes the dot product of 'self' with x. diff --git a/nifty6/operators/outer_product_operator.py b/nifty6/operators/outer_product_operator.py index 89c311155ca8e63630a6afd9f1d95d6a4be48bf6..c597fa24b705f001d3674e6da4d12e72b40fa3c8 100644 --- a/nifty6/operators/outer_product_operator.py +++ b/nifty6/operators/outer_product_operator.py @@ -27,12 +27,12 @@ class OuterProduct(LinearOperator): Parameters --------- - field: Field, domain: DomainTuple, the domain of the input field + field: Field --------- """ - def __init__(self, field, domain): - self._domain = domain + def __init__(self, domain, field): + self._domain = DomainTuple.make(domain) self._field = field self._target = DomainTuple.make( tuple(sub_d for sub_d in field.domain._dom + domain._dom))