Commit c9774906 authored by Martin Reinecke's avatar Martin Reinecke

Merge branch 'fix_slow_adapter' into 'NIFTy_5'

arguments need to be reversed

See merge request !291
parents eac89700 022afbdd
Pipeline #43414 passed with stages
in 18 minutes and 21 seconds
......@@ -56,7 +56,7 @@ class MultiField(object):
'defined on DomainTuples.')
domain = MultiDomain.make({key: v._domain
for key, v in dict.items()})
res = tuple(dict[key] if key in dict else Field(dom, 0)
res = tuple(dict[key] if key in dict else Field(dom, 0.)
for key, dom in zip(domain.keys(), domain.domains()))
return MultiField(domain, res)
......
......@@ -150,7 +150,8 @@ class _SlowFieldAdapter(LinearOperator):
if isinstance(x, MultiField):
return x[self._name]
else:
return MultiField.from_dict(self._tgt(mode), {self._name: x})
return MultiField.from_dict({self._name: x},
domain=self._tgt(mode))
def __repr__(self):
return '_SlowFieldAdapter'
......
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