astrokep.py 文件源码

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

项目:astrobase 作者: waqasbhatti 项目源码 文件源码
def kepler_lcdict_to_pkl(lcdict,
                         outfile=None):
    '''This simply writes the lcdict to a pickle.

    '''

    if not outfile:
        outfile = '%s-keplc.pkl' % lcdict['objectid'].replace(' ','-')

    # we're using pickle.HIGHEST_PROTOCOL here, this will make Py3 pickles
    # unreadable for Python 2.7
    with open(outfile,'wb') as outfd:
        pickle.dump(lcdict, outfd, protocol=pickle.HIGHEST_PROTOCOL)

    return os.path.abspath(outfile)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号