xrft.py 文件源码

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

项目:xrft 作者: rabernat 项目源码 文件源码
def _apply_detrend(da, axis_num):
    """Wrapper function for applying detrending"""
    if da.chunks:
        func = detrend_wrap(detrendn)
        da = xr.DataArray(func(da.data, axes=axis_num),
                        dims=da.dims, coords=da.coords)
    else:
        if da.ndim == 1:
            da = xr.DataArray(sps.detrend(da),
                            dims=da.dims, coords=da.coords)
        else:
            da = detrendn(da, axes=axis_num)
        # else:
        #     raise ValueError("Data should be dask array.")

    return da
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号