我有一段依赖于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
?
我在networkx
1.9文档中找到的方法bipartite_configuration_model
与移动到bipartite
模块的configuration_model
相同。据我所见,这是在迁移到2.0时完成的,但我没有发现任何明确提到这一点。