提交 c6469509 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Change some error messages

上级 3d873c2a
...@@ -2943,9 +2943,9 @@ class AdvancedSubtensor(Op): ...@@ -2943,9 +2943,9 @@ class AdvancedSubtensor(Op):
self.args = args #? self.args = args #?
#FIXME #FIXME
if len(args) != 2: #if len(args) != 2:
print >>sys.stderr, 'WARNING: Advanced indexing with %i arguments not supported yet' % len(args) # print >>sys.stderr, 'WARNING: Advanced indexing with %i arguments not supported yet' % len(args)
print >>sys.stderr, ' arguments are:', args # print >>sys.stderr, ' arguments are:', args
def make_node(self, x, *inputs): def make_node(self, x, *inputs):
x = as_tensor_variable(x) x = as_tensor_variable(x)
...@@ -2960,6 +2960,8 @@ class AdvancedSubtensor(Op): ...@@ -2960,6 +2960,8 @@ class AdvancedSubtensor(Op):
broadcastable = [False])]) broadcastable = [False])])
raise NotImplementedError('Advanced indexing of x (of dimension %i) with these argument dimensions (%s) not supported yet'\ raise NotImplementedError('Advanced indexing of x (of dimension %i) with these argument dimensions (%s) not supported yet'\
% (x.ndim, ','.join(str(input.ndim) for input in inputs))) % (x.ndim, ','.join(str(input.ndim) for input in inputs)))
raise NotImplementedError('Advanced indexing of x with arguments (%s) not supported yet'\
% ','.join(str(input) for input in inputs))
def perform(self, node, inputs, (out,)): def perform(self, node, inputs, (out,)):
pass pass
...@@ -2990,6 +2992,8 @@ class AdvancedIncSubtensor(Op): ...@@ -2990,6 +2992,8 @@ class AdvancedIncSubtensor(Op):
broadcastable = x.type.broadcastable)]) broadcastable = x.type.broadcastable)])
raise NotImplementedError('Advanced indexing increment of x (of dimension %i) by y (of dimension %i) with these argument dimensions (%s) not supported yet'\ raise NotImplementedError('Advanced indexing increment of x (of dimension %i) by y (of dimension %i) with these argument dimensions (%s) not supported yet'\
% (x.ndim, y.ndim, ','.join(str(input.ndim) for input in inputs))) % (x.ndim, y.ndim, ','.join(str(input.ndim) for input in inputs)))
raise NotImplementedError('Advanced indexing increment of x by y with arguments (%s) not supported yet'\
% ','.join(str(input) for input in inputs))
def perform(self, node, inputs, (out,)): def perform(self, node, inputs, (out,)):
pass pass
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论