提交 7c94a2ea authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Added test to make sure Mod fails on complex tensors as well

上级 249f0373
......@@ -4688,6 +4688,18 @@ class T_as_tensor_variable(unittest.TestCase):
assert ten.type.dtype == 'uint8'
class test_complex_mod(unittest.TestCase):
"""Make sure % fails on complex numbers."""
def test_fail(self):
x = vector(dtype='complex64')
try:
x % 5
assert False
except ComplexError:
pass
if __name__ == '__main__':
if 1:
unittest.main()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论