提交 9c832f3f authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix tests that were not computing what we expected.

上级 26bca5d4
...@@ -19,7 +19,9 @@ class T_random_function(unittest.TestCase): ...@@ -19,7 +19,9 @@ class T_random_function(unittest.TestCase):
rng_R = random_state_type() rng_R = random_state_type()
post_r, out = rf(rng_R, (4,)) # If calling RandomFunction directly, all args have to be specified,
# because shape will have to be moved to the end
post_r, out = rf(rng_R, (4,), 0., 1.)
assert out.type == tensor.dvector assert out.type == tensor.dvector
...@@ -67,8 +69,9 @@ class T_random_function(unittest.TestCase): ...@@ -67,8 +69,9 @@ class T_random_function(unittest.TestCase):
rf2 = RandomFunction(numpy.random.RandomState.uniform, tensor.dvector) rf2 = RandomFunction(numpy.random.RandomState.uniform, tensor.dvector)
rng_R = random_state_type() rng_R = random_state_type()
# use make_node to override some of the self.args # If calling RandomFunction directly, all args have to be specified,
post_r2, out2 = rf2(rng_R, (4,)) # because shape will have to be moved to the end
post_r2, out2 = rf2(rng_R, (4,), 0., 1.)
f = compile.function( f = compile.function(
[compile.In(rng_R, [compile.In(rng_R,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论