小编Pra*_*ija的帖子

max(nx.connected_component_subgraphs(),) 错误,没有属性“connected_component_subgraphs”

我正在尝试运行这段代码:

graph = nx.Graph()

largest_subgraph = max(nx.connected_component_subgraphs(graph), key=len)
Run Code Online (Sandbox Code Playgroud)

但我收到此错误消息:

AttributeError: module 'networkx' has no attribute 'connected_component_subgraphs'
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

python networkx tweepy

2
推荐指数
1
解决办法
1307
查看次数

标签 统计

networkx ×1

python ×1

tweepy ×1