提交 ed2f6a01 authored 作者: Frederic's avatar Frederic

fix a test in float32

上级 4ecb1ee6
...@@ -5151,10 +5151,11 @@ class T_reshape(unittest.TestCase): ...@@ -5151,10 +5151,11 @@ class T_reshape(unittest.TestCase):
assert numpy.all(f_sub(a_val, b_val) == [2, 3]) assert numpy.all(f_sub(a_val, b_val) == [2, 3])
def test_reshape_long_in_shape(self): def test_reshape_long_in_shape(self):
v = vector('v') v = dvector('v')
r = v.reshape((v.shape[0], 1L)) r = v.reshape((v.shape[0], 1L))
print r.eval({v: numpy.arange(5.)}) print r.eval({v: numpy.arange(5.)})
assert numpy.allclose(r.eval({v: numpy.arange(5.)}).T, numpy.arange(5.)) assert numpy.allclose(r.eval({v: numpy.arange(5.)}).T,
numpy.arange(5.))
def test_bad_shape(self): def test_bad_shape(self):
a = matrix('a') a = matrix('a')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论