Commit 747f275d authored by Philipp Arras's avatar Philipp Arras
Browse files

Merge branch 'fix_random' into 'NIFTy_6'

fix nondeterministic test

See merge request !508
parents 59a72c4b cda0e764
Pipeline #75588 passed with stages
in 10 minutes and 19 seconds
......@@ -77,7 +77,7 @@ def _check_linearity(op, domain_dtype, atol, rtol):
return
fld1 = from_random(op.domain, "normal", dtype=domain_dtype)
fld2 = from_random(op.domain, "normal", dtype=domain_dtype)
alpha = np.random.random() # FIXME: this can break badly with MPI!
alpha = 0.42
val1 = op(alpha*fld1+fld2)
val2 = alpha*op(fld1)+op(fld2)
assert_allclose(val1, val2, atol=atol, rtol=rtol)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment