networkx 中什么函数取代了 bipartite_configuration_model?
What function has replaced bipartite_configuration_model in networkx?
我有一段依赖于 networkx 的旧代码。我在最后一行收到错误消息:
# Generate a random graph with the appropriate degree sequence.
left_sequence = [left_degree for x in range(L)]
right_sequence = [right_degree for x in range(R)]
# Need to use `create_using=Graph()` or else networkx will create a
# multigraph.
graph = bipartite_configuration_model(left_sequence, right_sequence,
create_using=Graph(), seed=seed)
在较新版本的 networkx 中,什么功能取代了 bipartite_configuration_model
?
方法 bipartite_configuration_model
, which I've found in networkx
1.9 docs is the same as configuration_model
,已移至 bipartite
模块。据我所知,这是通过迁移到 2.0 完成的,但我没有发现任何明确提及这一点。
我有一段依赖于 networkx 的旧代码。我在最后一行收到错误消息:
# Generate a random graph with the appropriate degree sequence.
left_sequence = [left_degree for x in range(L)]
right_sequence = [right_degree for x in range(R)]
# Need to use `create_using=Graph()` or else networkx will create a
# multigraph.
graph = bipartite_configuration_model(left_sequence, right_sequence,
create_using=Graph(), seed=seed)
在较新版本的 networkx 中,什么功能取代了 bipartite_configuration_model
?
方法 bipartite_configuration_model
, which I've found in networkx
1.9 docs is the same as configuration_model
,已移至 bipartite
模块。据我所知,这是通过迁移到 2.0 完成的,但我没有发现任何明确提及这一点。