Hi all, I am a new here. Thanks for the great tool.
I am wondering if there is any concise way to get the node list (with the full graph’s node index) of a subgraph (heteograph). For example, I got a subgraph “kg_1” from “kg” via the following script:
kg_1 = dgl.sampling.sample_neighbors(kg, node_dict, fanout=16)
I want to get the node list of “kg_1”. My current implementation is to get the edge list by
kg_1.edata[dgl.EID][etype]
And then get the node list using find_edges for each edge type from the full graph “kg”
kg.find_edges(eids, etype)
Any better way to do this? I tried g.ndata[dgl.NID], but returned empty dictionary.
Thanks.
Zipei Fan