test_analysis.py 文件源码

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

项目:djinn 作者: ordjinnization 项目源码 文件源码
def build_failure_map(stages, projects, z):
    """
    Build a dict mapping the key "projects + stages" to the number
    of failures.
    :param stages: list of stages.
    :param projects: list of projects.
    :param z: a list of lists of failures.
    :return: the failures map.
    """
    failure_lookup = dict()
    for stages_index, failures_list in enumerate(z):
        for failures_list_index, failures in enumerate(failures_list):
            project = projects[stages_index]
            stage = stages[failures_list_index]
            failure_lookup[str(project) + str(stage)] = failures

    return failure_lookup
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号