utils.py 文件源码

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

项目:graynet 作者: raamana 项目源码 文件源码
def check_params_single_edge(base_features, in_dir, atlas, smoothing_param, node_size, out_dir, return_results):
    """"""

    check_features(base_features)

    if atlas.lower() not in parcellate.atlas_list:
        raise ValueError('Invalid atlas choice. Use one of {}'.format(parcellate.atlas_list))

    if not pexists(in_dir):
        raise IOError('Input directory at {} does not exist.'.format(in_dir))

    if out_dir is None and return_results is False:
        raise ValueError('Results are neither saved to disk or being received when returned.\n'
                         'Specify out_dir (not None) or make return_results=True')

    if out_dir is not None and not pexists(out_dir):
        os.mkdir(out_dir)

    # no checks on subdivison size yet, as its not implemented

    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号