Commit acef5270 authored by Philipp Arras's avatar Philipp Arras
Browse files

More tests

parent f4dc08ae
......@@ -88,16 +88,22 @@ def testBinary(type1, type2, space, seed):
ift.extra.check_operator(model, pos, ntries=ntries)
def testSpecialDistributionOps(space, seed):
def testInverseGamma(space, seed):
with ift.random.Context(seed):
pos = ift.from_random(space, 'normal')
alpha = 1.5
q = 0.73
model = ift.InverseGammaOperator(space, alpha, q)
ift.extra.check_operator(model, pos, ntries=20)
model = ift.UniformOperator(space, alpha, q)
ift.extra.check_operator(model, pos, ntries=20)
model = ift.LaplaceOperator(space, alpha, q)
@pmp("loc", [0, 13.2])
@pmp("scale", [1, 551.09])
@pmp("op", [ift.UniformOperator, ift.LaplaceOperator])
def testSpecialDistributionOps(space, seed, loc, scale, op):
with ift.random.Context(seed):
pos = ift.from_random(space, 'normal')
model = op(space, loc, scale)
ift.extra.check_operator(model, pos, ntries=20)
......
Supports Markdown
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