Commit ab9e53f8 authored by Rouven Lemmerz's avatar Rouven Lemmerz
Browse files

Updated Tests

parent 37a5691e
Pipeline #70764 passed with stages
in 17 minutes and 42 seconds
......@@ -45,7 +45,4 @@ def testInterpolationAccuracy(space, seed):
arr1 = op(pos).val
arr0 = invgamma.ppf(norm.cdf(pos.val), alpha, scale=q)
assert_allclose(arr0, arr1)
op = ift.UniformOperator(space, scale=qfld)
arr1 = op(pos).val
arr0 = norm.cdf(pos.val)*q
assert_allclose(arr0, arr1, rtol=1e-5)
......@@ -89,16 +89,16 @@ def testBinary(type1, type2, space, seed):
ift.extra.check_jacobian_consistency(model, pos, ntries=20)
def testInterpolationOps(space, seed):
def testSpecialDistributionOps(space, seed):
np.random.seed(seed)
S = ift.ScalingOperator(space, 1.)
pos = S.draw_sample()
alpha = 1.5
q = 0.73
model = ift.InverseGammaOperator(space, alpha, q)
ift.extra.check_jacobian_consistency(model, pos, tol=1e-5, ntries=20)
model = ift.UniformOperator(space)
ift.extra.check_jacobian_consistency(model, pos, tol=1e-6, ntries=20)
ift.extra.check_jacobian_consistency(model, pos, ntries=20)
model = ift.UniformOperator(space, alpha, q)
ift.extra.check_jacobian_consistency(model, pos, ntries=20)
@pmp('neg', [True, False])
......
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