Skip to content
GitLab
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
f8bc7d00
Commit
f8bc7d00
authored
May 10, 2017
by
Martin Reinecke
Browse files
be more concise about adjoint_inverse and inverse_adjoint
parent
25495b60
Pipeline
#12222
passed with stage
in 6 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/operators/linear_operator/linear_operator.py
View file @
f8bc7d00
...
...
@@ -86,29 +86,25 @@ class LinearOperator(Loggable, object):
raise
return
y
# If the operator supports inverse() then the inverse adjoint is identical
# to the adjoint inverse. We provide both names for convenience.
def
adjoint_inverse_times
(
self
,
x
,
spaces
=
None
,
**
kwargs
):
spaces
=
self
.
_check_input_compatibility
(
x
,
spaces
)
try
:
y
=
self
.
_adjoint_inverse_times
(
x
,
spaces
,
**
kwargs
)
except
(
NotImplementedError
):
if
self
.
unitary
:
y
=
self
.
_times
(
x
,
spaces
,
**
kwargs
)
else
:
raise
try
:
y
=
self
.
_inverse_adjoint_times
(
x
,
spaces
,
**
kwargs
)
except
(
NotImplementedError
):
if
self
.
unitary
:
y
=
self
.
_times
(
x
,
spaces
,
**
kwargs
)
else
:
raise
return
y
def
inverse_adjoint_times
(
self
,
x
,
spaces
=
None
,
**
kwargs
):
spaces
=
self
.
_check_input_compatibility
(
x
,
spaces
)
try
:
y
=
self
.
_inverse_adjoint_times
(
x
,
spaces
,
**
kwargs
)
except
(
NotImplementedError
):
if
self
.
unitary
:
y
=
self
.
_times
(
x
,
spaces
,
**
kwargs
)
else
:
raise
return
y
return
adjoint_inverse_times
(
x
,
spaces
,
**
kwargs
)
def
_times
(
self
,
x
,
spaces
):
raise
NotImplementedError
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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