multi_edge.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:graynet 作者: raamana 项目源码 文件源码
def add_nodal_positions(graph, centroids):
    "Adds the x, y, z attributes to each node in graph."

    # adding position info to nodes (for visualization later)
    for roi in centroids:
        graph.node[roi]['x'] = float(centroids[roi][0])
        graph.node[roi]['y'] = float(centroids[roi][1])
        graph.node[roi]['z'] = float(centroids[roi][2])

    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号