def test_init():
with tp.Model():
X1 = tp.Uniform(lower=-1, upper=1)
X2 = tp.Uniform(lower=-1)
X3 = tp.Uniform(upper=1)
X4 = tp.Uniform()
X7 = tp.Uniform(lower=X1, upper=X2)
# @raises(ValueError)
# def test_uniform_fail_lower():
# with tp.Model():
# X1 = tp.Uniform()
# X2 = tp.Uniform(lower=X1)
# @raises(ValueError)
# def test_uniform_fail_upper():
# with tp.Model() as model:
# X1 = tp.Uniform()
# X2 = tp.Uniform(upper=X1)
评论列表
文章目录