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

Fix code review comment

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