Commit db3e0bfa authored by Philipp Arras's avatar Philipp Arras
Browse files

Simplification

parent dcfab6d7
...@@ -263,8 +263,6 @@ class LinearOperator(Operator): ...@@ -263,8 +263,6 @@ class LinearOperator(Operator):
s = "The operator's and field's domains don't match." s = "The operator's and field's domains don't match."
from ..domain_tuple import DomainTuple from ..domain_tuple import DomainTuple
from ..multi_domain import MultiDomain from ..multi_domain import MultiDomain
if not isinstance(self._dom(mode), if not isinstance(self._dom(mode), [DomainTuple, MultiDomain]):
[DomainTuple, MultiDomain]) or isinstance( s += " Your operator's domain is neither a `DomainTuple` nor a `MultiDomain`."
x.domain, [DomainTuple, MultiDomain]):
s += " One of the domains is neither a `DomainTuple` nor a `MultiDomain`."
raise ValueError(s) raise ValueError(s)
...@@ -70,10 +70,8 @@ class Operator(NiftyMetaBase()): ...@@ -70,10 +70,8 @@ class Operator(NiftyMetaBase()):
s = "The operator's and field's domains don't match." s = "The operator's and field's domains don't match."
from ..domain_tuple import DomainTuple from ..domain_tuple import DomainTuple
from ..multi_domain import MultiDomain from ..multi_domain import MultiDomain
if not isinstance(self._dom(mode), if not isinstance(self._dom(mode), [DomainTuple, MultiDomain]):
[DomainTuple, MultiDomain]) or isinstance( s += " Your operator's domain is neither a `DomainTuple` nor a `MultiDomain`."
x.domain, [DomainTuple, MultiDomain]):
s += " One of the domains is neither a `DomainTuple` nor a `MultiDomain`."
raise ValueError(s) raise ValueError(s)
def __call__(self, x): def __call__(self, x):
......
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