Commit b08d9e1b authored by Philipp Arras's avatar Philipp Arras

More sophisticated __repr__ for FieldAdapter

parent 4be4bc7f
Pipeline #45203 passed with stages
in 8 minutes and 11 seconds
......@@ -147,7 +147,16 @@ class FieldAdapter(LinearOperator):
return MultiField(self._tgt(mode), (x,))
def __repr__(self):
return 'FieldAdapter'
s = 'FieldAdapter'
dom = isinstance(self._domain, MultiDomain)
tgt = isinstance(self._target, MultiDomain)
if dom and tgt:
s += ' {} <- {}'.format(self._target.keys(), self._domain.keys())
elif dom:
s += ' <- {}'.format(self._domain.keys())
elif tgt:
s += ' {} <-'.format(self._target.keys())
return s
class _SlowFieldAdapter(LinearOperator):
......
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