gpickle.py 文件源码

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

项目:pybel 作者: pybel 项目源码 文件源码
def from_bytes(bytes_graph, check_version=True):
    """Reads a graph from bytes (the result of pickling the graph).

    :param bytes bytes_graph: File or filename to write
    :param bool check_version: Checks if the graph was produced by this version of PyBEL
    :return: A BEL graph
    :rtype: BELGraph
    """
    graph = loads(bytes_graph)

    raise_for_not_bel(graph)
    if check_version:
        raise_for_old_graph(graph)

    return graph
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号