首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在networkx中,什么功能取代了bipartite_configuration_model?

在networkx中,什么功能取代了bipartite_configuration_model?
EN

Stack Overflow用户
提问于 2020-09-22 16:41:52
回答 1查看 17关注 0票数 1

我有一段较旧的依赖于networkx的代码。我在最后一行得到一个错误:

代码语言:javascript
复制
    # 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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-09-22 17:12:13

我在networkx 1.9文档中找到的bipartite_configuration_model方法与configuration_model相同,后者被移到bipartite模块中。据我所知,这是在迁移到2.0时完成的,但我没有找到任何明确提到这一点的地方。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64006070

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档