简体   繁体   English

Networkx,DIAC图,具有deph限制的节点的子图

[英]Networkx, DIAC graph, subgraph from a node with deph limit

I have a Digraph constructed with networkx that has 37379 nodes and 61263 edges. 我有一个用networkx构造的Digraph,它具有37379个节点和61263条边。 I would like to extract for a node target, a subgraph that contain only the target node and the first nodes that are linked to it. 我想为节点目标提取一个子图,该子图仅包含目标节点和链接到该目标节点的第一个节点。

I tried the answers here and it only drawn me the target node. 我在这里尝试了答案,但只吸引了我目标节点。 Have i missed something ? 我错过了什么吗? I checked that there were edges in my graph ( i just output as json and saw "source and target" items) 我检查了图表中是否有边缘(我只是输出为json并看到了“源和目标”项)

请删除问题,这是一个键类型错误,因为我的键是整数,并尝试使用字符串键制作一个子图...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM