gpickle.py 文件源码

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

项目:pybel 作者: pybel 项目源码 文件源码
def to_pickle(graph, file, protocol=HIGHEST_PROTOCOL):
    """Writes this graph to a pickle object with :func:`networkx.write_gpickle`.  Note that the pickle module has some
    incompatibilities between Python 2 and 3. To export a universally importable pickle, choose 0, 1, or 2.

    :param BELGraph graph: A BEL graph
    :param str or file: A file or filename to write to
    :param int protocol: Pickling protocol to use

    .. seealso:: https://docs.python.org/3.6/library/pickle.html#data-stream-format
    """
    raise_for_not_bel(graph)
    write_gpickle(graph, file, protocol=protocol)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号