timelib.py 文件源码

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

项目:pygeotools 作者: dshean 项目源码 文件源码
def dt2o(dt):
    """Convert datetime to Python ordinal
    """
    #return datetime.toordinal(dt)
    #This works for arrays of dt
    #return np.array(matplotlib.dates.date2num(dt))
    return matplotlib.dates.date2num(dt)

#Need to split ordinal into integer and decimal parts
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号