提交 c82a180b authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Reverted 81914b004731 to fix a test in a way that better preserves its original goal

上级 2e6b6819
......@@ -655,16 +655,12 @@ def test_local_merge_abs():
assert len(f.maker.env.toposort())==2
def test_mixeddiv():
"""Test that int division raises an exception."""
"""Test that int division is preserved"""
i = iscalar()
d = dscalar()
try:
0 == function([i,d], d*(i/(i+1)))(3, 1.0)
assert False
except theano.scalar.IntegerDivisionError:
pass
assert 0 == function([i, d], d * (i // (i + 1)))(3, 1.0)
def test_const_type_in_mul_canonizer():
input = dmatrix()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论