我尝试使用 copy.deepcopy(graph) 但出现错误:
我的代码:
new_graph = TNEANet.New()
....
# some define for new_graph
....
copy_graph = copy.deepcopy(new_graph)
执行错误:
TypeError: object.__new__(SwigPyObject) is not safe, use SwigPyObject.__new__()
我还发现 API 有一个定义API Document。所以我尝试使用TNEANet(Graph)
该任务:
new_graph = TNEANet.New()
....
# some define for new_graph
....
copy_graph = TNEANet(new_graph)
执行错误:
TypeError: in method 'new_TNEANet', argument 1 of type 'TSIn &'