提交 febb463d authored 作者: James Bergstra's avatar James Bergstra

added more information to a TypeError raised in gof/graph

上级 1b09acd8
......@@ -153,7 +153,8 @@ class Apply(utils.object2):
for curr, new in zip(self.inputs, inputs):
if not curr.type == new.type:
if strict:
raise TypeError("Cannot change the type of this input.", curr, new)
raise TypeError("Cannot change the type of this input.", ((curr, curr.type),
(new, new.type)))
else:
remake_node = True
if remake_node:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论