提交 0c0db1c3 编写于 作者: Y Yelrose

fixed subgraph edge_feat

上级 05c356e5
......@@ -589,17 +589,12 @@ class Graph(object):
if eid is None and edges is None:
raise ValueError("Eid and edges can't be None at the same time.")
sub_edge_feat = {}
if edges is None:
edges = self._edges[eid]
else:
edges = np.array(edges, dtype="int64")
sub_edges = graph_kernel.map_edges(
np.arange(
len(edges), dtype="int64"), edges, reindex)
sub_edge_feat = {}
if edges is None:
if with_edge_feat:
for key, value in self._edge_feat.items():
if eid is None:
......@@ -609,6 +604,10 @@ class Graph(object):
else:
sub_edge_feat = edge_feats
sub_edges = graph_kernel.map_edges(
np.arange(
len(edges), dtype="int64"), edges, reindex)
sub_node_feat = {}
if with_node_feat:
for key, value in self._node_feat.items():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册