gpickle.py 文件源码

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

项目:pybel 作者: pybel 项目源码 文件源码
def from_pickle(path, check_version=True):
    """Reads a graph from a gpickle file.

    :param file or str path: File or filename to read. Filenames ending in .gz or .bz2 will be uncompressed.
    :param bool check_version: Checks if the graph was produced by this version of PyBEL
    :return: A BEL graph
    :rtype: BELGraph
    """
    graph = read_gpickle(path)

    raise_for_not_bel(graph)
    if check_version:
        raise_for_old_graph(graph)

    return graph
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号