special.py 文件源码

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

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


问题


面经


文章

微信
公众号

扫码关注公众号