提交 1e3f2e39 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed test test_IsInf_IsNan in floatX=float32

上级 bd0a1113
...@@ -409,14 +409,14 @@ class test_Prod(unittest.TestCase): ...@@ -409,14 +409,14 @@ class test_Prod(unittest.TestCase):
class test_IsInf_IsNan(unittest.TestCase): class test_IsInf_IsNan(unittest.TestCase):
def setUp(self): def setUp(self):
self.test_vals = map(numpy.array, [ self.test_vals = [numpy.array(x, dtype=config.floatX) for x in [
0, 0,
1, 1,
numpy.nan, numpy.nan,
numpy.inf, numpy.inf,
-numpy.inf, -numpy.inf,
[numpy.nan, numpy.inf, -numpy.inf, 0, 1, -1], [numpy.nan, numpy.inf, -numpy.inf, 0, 1, -1],
]) ]]
self.scalar = tensor.scalar() self.scalar = tensor.scalar()
self.vector = tensor.vector() self.vector = tensor.vector()
self.mode = get_default_mode() self.mode = get_default_mode()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论