test_rotate_utils.py 文件源码

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

项目:pytomo3d 作者: computational-seismology 项目源码 文件源码
def test_rotate_certain_angle():

    d1 = np.array([1.0, 0.0])
    d2 = np.array([0.0, 1.0])

    dnew1, dnew2 = rotate.rotate_certain_angle(d1, d2, 30.0)

    dnew1_true = np.array([np.sqrt(3)/2.0, 0.5])
    dnew2_true = np.array([-0.5, np.sqrt(3)/2.0])
    npt.assert_allclose(dnew1, dnew1_true)
    npt.assert_allclose(dnew2, dnew2_true)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号