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

Python 2.4 compatibility fix

上级 5be5ea4b
...@@ -283,10 +283,11 @@ class TestComputeTestValue(unittest.TestCase): ...@@ -283,10 +283,11 @@ class TestComputeTestValue(unittest.TestCase):
n_steps=k) n_steps=k)
assert False assert False
except ValueError, e: except ValueError, e:
# The first message is for numpy before 1.6 # The first message is for numpy before 1.6.
# The second is a new message in numpy 1.6 # The second is a new message in numpy 1.6.
assert (e.message.startswith("shape mismatch") or assert (str(e).startswith("shape mismatch") or
e.message.startswith("operands could not be broadcast together with shapes")) str(e).startswith("operands could not be broadcast "
"together with shapes"))
finally: finally:
theano.config.compute_test_value = orig_compute_test_value theano.config.compute_test_value = orig_compute_test_value
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论