def safe_make_node(op, *inputs):
""" Emulate the behaviour of make_node when op is a function.
Normally op in an instead of the Op class.
"""
node = op(*inputs)
if isinstance(node, list):
return node[0].owner
else:
return node.owner
评论列表
文章目录