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
40996be6
Commit
40996be6
authored
Jul 13, 2018
by
Philipp Arras
Browse files
Make gradient of gaussian real
parent
f460aea6
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/library/gaussian_energy.py
View file @
40996be6
...
...
@@ -61,7 +61,7 @@ class GaussianEnergy(Energy):
@
property
@
memo
def
gradient
(
self
):
return
self
.
_inp
.
jacobian
.
adjoint_times
(
self
.
_icovres
)
return
self
.
_inp
.
jacobian
.
adjoint_times
(
self
.
_icovres
)
.
real
@
property
@
memo
...
...
nifty5/operators/power_distributor.py
View file @
40996be6
...
...
@@ -62,10 +62,4 @@ class PowerDistributor(DOFDistributor):
def
apply
(
self
,
x
,
mode
):
self
.
_check_input
(
x
,
mode
)
if
x
.
dtype
==
np
.
complex
:
if
x
.
imag
.
sum
()
==
0
:
x
=
x
.
real
else
:
print
(
'Warning: Assume real in PowerDistributor.'
)
x
=
x
.
real
return
DOFDistributor
.
apply
(
self
,
x
,
mode
)
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