提交 28304dce authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed some tests when config.cast_policy == numpy and config.floatX == float32

上级 c7ec0733
...@@ -185,7 +185,7 @@ class T_random_function(unittest.TestCase): ...@@ -185,7 +185,7 @@ class T_random_function(unittest.TestCase):
broadcastable=(False, True, True))() broadcastable=(False, True, True))()
high = tensor.TensorType(dtype='float64', high = tensor.TensorType(dtype='float64',
broadcastable=(True, True, True, False))() broadcastable=(True, True, True, False))()
post_out2, out2 = uniform(rng_R, size=None, ndim=2, low=low, high=high) post_out2, out2 = uniform(rng_R, size=None, ndim=2, low=low, high=high, dtype='float64')
self.assertEqual(out2.ndim, 4) self.assertEqual(out2.ndim, 4)
self.assertEqual(out2.broadcastable, (True,False,True,False)) self.assertEqual(out2.broadcastable, (True,False,True,False))
...@@ -585,7 +585,7 @@ class T_random_function(unittest.TestCase): ...@@ -585,7 +585,7 @@ class T_random_function(unittest.TestCase):
rng_R = random_state_type() rng_R = random_state_type()
low = tensor.dvector() low = tensor.dvector()
high = tensor.dcol() high = tensor.dcol()
post_r, out = uniform(rng_R, low=low, high=high) post_r, out = uniform(rng_R, low=low, high=high, dtype='float64')
assert out.ndim == 2 assert out.ndim == 2
f = compile.function([rng_R, low, high], [post_r, out], accept_inplace=True) f = compile.function([rng_R, low, high], [post_r, out], accept_inplace=True)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论