special.py 文件源码

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

项目:physt 作者: janpipek 项目源码 文件源码
def transform(cls, value):
        value = np.asarray(value, dtype=np.float64)
        assert value.shape[-1] == 2
        result = np.empty_like(value)
        result[...,0] = np.hypot(value[...,1], value[...,0])
        result[...,1] = np.arctan2(value[...,1], value[...,0]) % (2 * np.pi)
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号