提交 80fc79ec authored 作者: Frederic Bastien's avatar Frederic Bastien

better error message.

上级 970ea842
...@@ -3398,9 +3398,9 @@ class AdvancedSubtensor(Op): ...@@ -3398,9 +3398,9 @@ class AdvancedSubtensor(Op):
ind1 = as_tensor_variable(inputs[0]) ind1 = as_tensor_variable(inputs[0])
ind2 = as_tensor_variable(inputs[1]) ind2 = as_tensor_variable(inputs[1])
if not (ind1.type.dtype.startswith('int') or ind1.type.dtype.startswith('uint')): if not (ind1.type.dtype.startswith('int') or ind1.type.dtype.startswith('uint')):
raise TypeError() raise TypeError('the indices into a matrix must be int or uint. It is ',ind1.type.dtype)
if not (ind2.type.dtype.startswith('int') or ind2.type.dtype.startswith('uint')): if not (ind2.type.dtype.startswith('int') or ind2.type.dtype.startswith('uint')):
raise TypeError() raise TypeError('the indices into a matrix must be int or uint. It is ',ind2.type.dtype)
if ind1.ndim == 1 and ind2.ndim == 1: if ind1.ndim == 1 and ind2.ndim == 1:
return gof.Apply(self, return gof.Apply(self,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论