gather_datasets.py 文件源码

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

项目:graynet 作者: raamana 项目源码 文件源码
def get_weights_order(graph, nodes=atlas_rois):
    "returns weights in the order of nodes requested"

    # order is not guaranteed below
    edge_dict = nx.get_edge_attributes(graph, 'weight')
    # so ordering it here, to ensure correspondence across subjects
    weights = [ graph[x][y]['weight'] for x in nodes for y in nodes if (x,y) in edge_dict ]

    return np.array(weights)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号