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
a1e34940
Commit
a1e34940
authored
Jan 19, 2018
by
Martin Reinecke
Browse files
better behaviour for factor=0.
parent
60b965f2
Pipeline
#23850
passed with stage
in 4 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/operators/scaling_operator.py
View file @
a1e34940
...
...
@@ -69,7 +69,10 @@ class ScalingOperator(EndomorphicOperator):
@
property
def
inverse
(
self
):
return
ScalingOperator
(
1.
/
self
.
_factor
,
self
.
_domain
)
if
self
.
_factor
!=
0.
:
return
ScalingOperator
(
1.
/
self
.
_factor
,
self
.
_domain
)
from
.inverse_operator
import
InverseOperator
return
InverseOperator
(
self
)
@
property
def
adjoint
(
self
):
...
...
@@ -81,5 +84,7 @@ class ScalingOperator(EndomorphicOperator):
@
property
def
capability
(
self
):
if
self
.
_factor
==
0.
:
return
self
.
TIMES
|
self
.
ADJOINT_TIMES
return
(
self
.
TIMES
|
self
.
ADJOINT_TIMES
|
self
.
INVERSE_TIMES
|
self
.
ADJOINT_INVERSE_TIMES
)
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