提交 2bfacf95 authored 作者: Frederic's avatar Frederic

Fix tests with numpy 1.10. The problem is how we compare the numpy version.

上级 c4a2fd88
...@@ -5892,12 +5892,13 @@ class test_arithmetic_cast(unittest.TestCase): ...@@ -5892,12 +5892,13 @@ class test_arithmetic_cast(unittest.TestCase):
config.int_division == 'floatX'): config.int_division == 'floatX'):
assert theano_dtype == config.floatX assert theano_dtype == config.floatX
continue continue
numpy_version = numpy.__version__.split('.')[:2] numpy_version = [int(v) for v in
numpy.__version__.split('.')[:2]]
if (cfg == 'numpy+floatX' and if (cfg == 'numpy+floatX' and
a_type == 'complex128' and a_type == 'complex128' and
b_type == 'float32' and b_type == 'float32' and
combo == ('scalar', 'array') and combo == ('scalar', 'array') and
bool(numpy_version >= ['1', '6']) and bool(numpy_version >= [1, 6]) and
theano_dtype == 'complex128' and theano_dtype == 'complex128' and
numpy_dtypes == ['complex64', numpy_dtypes == ['complex64',
'complex64']): 'complex64']):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论