Commit c2bfa5d3 authored by Martin Reinecke's avatar Martin Reinecke

Merge branch 'reprs' into 'NIFTy_5'

Better __repr__ for FieldAdapter

See merge request !319
parents 35dc4f9b 732db45d
Pipeline #47451 passed with stages
in 18 minutes and 55 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