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
60672433
Commit
60672433
authored
6 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
workaround for problem with random numers and MPI
parent
f1709dd5
No related branches found
No related tags found
2 merge requests
!324
New gridder (again!)
,
!318
switch from numpy.fft to pypocketfft
Pipeline
#48171
passed
6 years ago
Stage: build_docker
Stage: test
Stage: demo_runs
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nifty5/extra.py
+1
-1
1 addition, 1 deletion
nifty5/extra.py
test/test_operators/test_adjoint.py
+1
-0
1 addition, 0 deletions
test/test_operators/test_adjoint.py
with
2 additions
and
1 deletion
nifty5/extra.py
+
1
−
1
View file @
60672433
...
...
@@ -72,7 +72,7 @@ def _full_implementation(op, domain_dtype, target_dtype, atol, rtol,
def
_check_linearity
(
op
,
domain_dtype
,
atol
,
rtol
):
fld1
=
from_random
(
"
normal
"
,
op
.
domain
,
dtype
=
domain_dtype
)
fld2
=
from_random
(
"
normal
"
,
op
.
domain
,
dtype
=
domain_dtype
)
alpha
=
np
.
random
.
random
()
alpha
=
np
.
random
.
random
()
# FIXME: this can break badly with MPI!
val1
=
op
(
alpha
*
fld1
+
fld2
)
val2
=
alpha
*
op
(
fld1
)
+
op
(
fld2
)
_assert_allclose
(
val1
,
val2
,
atol
=
atol
,
rtol
=
rtol
)
...
...
This diff is collapsed.
Click to expand it.
test/test_operators/test_adjoint.py
+
1
−
0
View file @
60672433
...
...
@@ -37,6 +37,7 @@ _pow_spaces = [ift.PowerSpace(ift.RGSpace((17, 38), harmonic=True))]
pmp
=
pytest
.
mark
.
parametrize
dtype
=
list2fixture
([
np
.
float64
,
np
.
complex128
])
np
.
random
.
seed
(
42
)
@pmp
(
'
sp
'
,
_p_RG_spaces
)
def
testLOSResponse
(
sp
,
dtype
):
...
...
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