提交 7ee1c6a6 authored 作者: Frederic's avatar Frederic

Fix test with python 32 bit

上级 5ba85f6b
...@@ -127,7 +127,14 @@ class TestBinCountOp(utt.InferShapeTester): ...@@ -127,7 +127,14 @@ class TestBinCountOp(utt.InferShapeTester):
x = T.vector('x', dtype=dtype) x = T.vector('x', dtype=dtype)
# uint64 always fails # uint64 always fails
if dtype in ('uint64',): # int64 and uint32 also fail if python int are 32-bit
int_bitwidth = theano.gof.python_int_bitwidth()
if int_bitwidth == 64:
numpy_unsupported_dtypes = ('uint64',)
if int_bitwidth == 32:
numpy_unsupported_dtypes = ('uint32', 'int64', 'uint64')
# uint64 always fails
if dtype in numpy_unsupported_dtypes:
self.assertRaises(TypeError, bincount, x) self.assertRaises(TypeError, bincount, x)
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论