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
e72f8abf
Commit
e72f8abf
authored
Jan 23, 2020
by
Vincent Eberle
Browse files
added test, but broken
parent
10527efd
Pipeline
#67704
failed with stages
in 9 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_energy_gradients.py
View file @
e72f8abf
...
...
@@ -50,13 +50,13 @@ def test_ScaledEnergy(field):
energy
=
ift
.
GaussianEnergy
(
domain
=
field
.
domain
)
ift
.
extra
.
check_jacobian_consistency
(
energy
.
scale
(
0.3
),
field
)
# TODO: Fix tests
#lin = ift.Linearization.make_var(field)
#met1 = ift.GaussianEnergy(field
)
#met2 = ift.GaussianEnergy.scale(0.3)(field
)
#assert
met
1
=
= met2 / 0.3
#
assert isinstance(met2, ift.SandwichOperator)
lin
=
ift
.
Linearization
.
make_var
(
field
,
want_metric
=
True
)
met1
=
energy
(
lin
).
metric
sE
=
energy
.
scale
(
0.3
)
linn
=
sE
(
lin
)
met
2
=
linn
.
metric
assert
np
.
assert_allclose
(
met1
(
field
),
met2
(
field
)
/
0.3
,
rtol
=
1e-12
)
assert
isinstance
(
met2
,
ift
.
SandwichOperator
)
def
test_studentt
(
field
):
energy
=
ift
.
StudentTEnergy
(
domain
=
field
.
domain
,
theta
=
.
5
)
...
...
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