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
48e001f9
Commit
48e001f9
authored
May 11, 2017
by
Theo Steininger
Browse files
Fixed copy keywords in DiagonalOperator.
parent
469df51f
Pipeline
#12286
passed with stages
in 10 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/operators/diagonal_operator/diagonal_operator.py
View file @
48e001f9
...
...
@@ -21,6 +21,7 @@ import numpy as np
from
d2o
import
distributed_data_object
,
\
STRATEGIES
as
DISTRIBUTION_STRATEGIES
from
nifty.basic_arithmetics
import
log
as
nifty_log
from
nifty.config
import
nifty_configuration
as
gc
from
nifty.field
import
Field
from
nifty.operators.endomorphic_operator
import
EndomorphicOperator
...
...
@@ -72,16 +73,16 @@ class DiagonalOperator(EndomorphicOperator):
return
diagonal
def
inverse_diagonal
(
self
,
bare
=
False
):
return
1
/
self
.
diagonal
(
bare
=
bare
,
copy
=
False
)
return
1
.
/
self
.
diagonal
(
bare
=
bare
,
copy
=
False
)
def
trace
(
self
,
bare
=
False
):
return
self
.
diagonal
(
bare
=
bare
,
copy
=
False
).
sum
()
def
inverse_trace
(
self
,
bare
=
False
):
return
self
.
inverse_diagonal
(
bare
=
bare
,
copy
=
False
).
sum
()
return
self
.
inverse_diagonal
(
bare
=
bare
).
sum
()
def
trace_log
(
self
):
log_diagonal
=
self
.
diagonal
(
copy
=
False
)
.
apply_scalar_function
(
np
.
log
)
log_diagonal
=
nifty_log
(
self
.
diagonal
(
copy
=
False
))
return
log_diagonal
.
sum
()
def
determinant
(
self
):
...
...
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