projection.py 文件源码

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

项目:wrf-python 作者: NCAR 项目源码 文件源码
def cartopy_xlim(self, geobounds):
        """Return the x extents in projected coordinates for cartopy.

        Returns:

            :obj:`list`: A pair of [xmin, xmax].

        See Also:

            :mod:`cartopy`, :mod:`matplotlib`

        """
        try:
            _ = len(geobounds)
        except TypeError:
            x_extents= self._cart_extents(geobounds)[0]
        else:
            extents = self._cart_extents(geobounds)
            x_extents = np.empty(extents.shape, np.object)

            for idxs, extent in np.ndenumerate(extents):
                x_extents[idxs] = extent[0]

        return x_extents
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号