Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
c2bfa5d3
Commit
c2bfa5d3
authored
Apr 27, 2019
by
Martin Reinecke
Browse files
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
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/simple_linear_operators.py
View file @
c2bfa5d3
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment