gdal_array.py 文件源码

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

项目:gee-bridge 作者: francbartoli 项目源码 文件源码
def flip_code(code):
    if isinstance(code, (numpy.dtype,type)):
        # since several things map to complex64 we must carefully select
        # the opposite that is an exact match (ticket 1518)
        if code == numpy.int8:
            return gdalconst.GDT_Byte
        if code == numpy.complex64:
            return gdalconst.GDT_CFloat32

        for key, value in codes.items():
            if value == code:
                return key
        return None
    else:
        try:
            return codes[code]
        except KeyError:
            return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号