test_data.py 文件源码

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

项目:psyplot 作者: Chilipp 项目源码 文件源码
def _test_ds(self):
        import xarray as xr
        import pandas as pd
        time = xr.Coordinate('time', pd.to_datetime(
            ['1979-01-01T12:00:00', '1979-01-01T18:00:00',
             '1979-01-01T18:30:00']),
            encoding={'units': 'day as %Y%m%d.%f'})
        var = xr.Variable(('time', 'x'), np.zeros((len(time), 5)))
        return xr.Dataset({'test': var}, {'time': time})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号