Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
ad0ecc7f
Commit
ad0ecc7f
authored
5 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
fix random seeding
parent
328e678f
No related branches found
No related tags found
1 merge request
!428
Switch to new numpy random generators
Pipeline
#71166
failed
5 years ago
Stage: build_docker
Stage: test
Stage: demo_runs
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_operators/test_correlated_fields.py
+2
-2
2 additions, 2 deletions
test/test_operators/test_correlated_fields.py
with
2 additions
and
2 deletions
test/test_operators/test_correlated_fields.py
+
2
−
2
View file @
ad0ecc7f
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
import
pytest
import
pytest
from
numpy.random
import
seed
from
numpy.testing
import
assert_allclose
from
numpy.testing
import
assert_allclose
import
nifty6
as
ift
import
nifty6
as
ift
...
@@ -39,7 +38,7 @@ def testAmplitudesConsistency(rseed, sspace, Astds, offset_std, N):
...
@@ -39,7 +38,7 @@ def testAmplitudesConsistency(rseed, sspace, Astds, offset_std, N):
sc
.
add
(
op
(
s
.
extract
(
op
.
domain
)))
sc
.
add
(
op
(
s
.
extract
(
op
.
domain
)))
return
sc
.
mean
.
val
,
sc
.
var
.
sqrt
().
val
return
sc
.
mean
.
val
,
sc
.
var
.
sqrt
().
val
seed
(
rseed
)
ift
.
random
.
push_sseq_from_
seed
(
rseed
)
nsam
=
100
nsam
=
100
fsspace
=
ift
.
RGSpace
((
12
,),
(
0.4
,))
fsspace
=
ift
.
RGSpace
((
12
,),
(
0.4
,))
...
@@ -91,6 +90,7 @@ def testAmplitudesConsistency(rseed, sspace, Astds, offset_std, N):
...
@@ -91,6 +90,7 @@ def testAmplitudesConsistency(rseed, sspace, Astds, offset_std, N):
em
,
estd
=
stats
(
fa
.
slice_fluctuation
(
0
),
samples
)
em
,
estd
=
stats
(
fa
.
slice_fluctuation
(
0
),
samples
)
assert_allclose
(
m
,
em
,
rtol
=
0.5
)
assert_allclose
(
m
,
em
,
rtol
=
0.5
)
ift
.
random
.
pop_sseq
()
assert
op
.
target
[
-
2
]
==
sspace
assert
op
.
target
[
-
2
]
==
sspace
assert
op
.
target
[
-
1
]
==
fsspace
assert
op
.
target
[
-
1
]
==
fsspace
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment