提交 1ed8895e authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix code review comment

上级 b2f99581
......@@ -726,7 +726,7 @@ def repeat(x, repeats, axis=None):
if repeats.ndim == 1:
repeats = repeats[0]
if x.dtype == ('uint64',):
if x.dtype == 'uint64':
raise TypeError("theano.tensor.repeat don't support dtype uint64")
if axis is None:
......
......@@ -423,9 +423,8 @@ class TestRepeatOp(utt.InferShapeTester):
for dtype in tensor.discrete_dtypes:
r_var = T.scalar(dtype=dtype)
r = numpy.asarray(3, dtype=dtype)
if (dtype in self.numpy_unsupported_dtypes and
# uint64 is always not implemented
(r_var.ndim == 1 or dtype == 'uint64')):
if (dtype == 'uint64' or
(dtype in self.numpy_unsupported_dtypes and r_var.ndim == 1)):
self.assertRaises(TypeError,
repeat, x, r_var, axis=axis)
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论