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
ba4daa84
Commit
ba4daa84
authored
Sep 25, 2017
by
Martin Reinecke
Browse files
remove unused attribute
parent
78a6d9e8
Pipeline
#18579
passed with stage
in 4 minutes and 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/operators/diagonal_operator/diagonal_operator.py
View file @
ba4daa84
...
...
@@ -107,17 +107,6 @@ class DiagonalOperator(EndomorphicOperator):
"""
return
self
.
_diagonal
.
copy
()
if
copy
else
self
.
_diagonal
def
inverse_diagonal
(
self
):
""" Returns the inverse-diagonal of the operator.
Returns
-------
out : Field
The inverse of the diagonal of the Operator.
"""
return
1.
/
self
.
_diagonal
# ---Mandatory properties and methods---
@
property
...
...
test/test_operators/test_diagonal_operator.py
View file @
ba4daa84
...
...
@@ -84,10 +84,3 @@ class DiagonalOperator_Tests(unittest.TestCase):
D
=
DiagonalOperator
(
diag
,
copy
=
copy
)
diag_op
=
D
.
diagonal
()
assert_allclose
(
diag
.
val
,
diag_op
.
val
)
@
expand
(
product
(
spaces
,
[
True
,
False
]))
def
test_inverse
(
self
,
space
,
copy
):
diag
=
Field
.
from_random
(
'normal'
,
domain
=
space
)
D
=
DiagonalOperator
(
diag
,
copy
=
copy
)
diag_op
=
D
.
inverse_diagonal
()
assert_allclose
(
1.
/
diag
.
val
,
diag_op
.
val
)
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