提交 50e6ab60 authored 作者: Frederic Bastien's avatar Frederic Bastien

fix in error msg.

上级 79d4c39f
...@@ -587,8 +587,8 @@ class ScalarOp(Op): ...@@ -587,8 +587,8 @@ class ScalarOp(Op):
if not isinstance(variables, (list, tuple)) or any(not isinstance(x, Type) for x in variables): if not isinstance(variables, (list, tuple)) or any(not isinstance(x, Type) for x in variables):
raise TypeError("output_types_preference should return a list or a tuple of types", self.output_types_preference, variables) raise TypeError("output_types_preference should return a list or a tuple of types", self.output_types_preference, variables)
if len(variables) != self.nout: if len(variables) != self.nout:
raise TypeError("Not the right number of outputs produced for %s(%s) by %s. Expected %s, got ?s." raise TypeError("Not the right number of outputs types produced for %s(%s) by %s. Expected %s, got %s."
% (self, ", ".join(str(input.type) for input in inputs), % (self, ", ".join(str(type) for type in variables),
self.output_types_preference, self.nout, len(variables))) self.output_types_preference, self.nout, len(variables)))
return variables return variables
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论