提交 24f42f24 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Added a simple test to test that Theano crashes when trying to do x % y with…

Added a simple test to test that Theano crashes when trying to do x % y with either x or y a complex number
上级 f8ef0ebe
......@@ -175,6 +175,19 @@ class test_logical(unittest.TestCase):
self.assertTrue(fn(a,b) == ~a, (a,))
class test_complex_mod(unittest.TestCase):
"""Make sure % fails on complex numbers."""
def test_fail(self):
x = complex64()
y = int32()
try:
theano.function([x, y], x % y)
assert False
except TypeError:
pass
class test_div(unittest.TestCase):
def test_0(self):
a = int8()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论