test_interpolate_constraints.py 文件源码

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

项目:toppra 作者: hungpham2511 项目源码 文件源码
def test_canonical_mat(self, intp_fixture):
        """
        """
        pc, pc_intp = intp_fixture
        # number
        for i in range(pc_intp.N):
            ds = pc_intp.ss[i+1] - pc_intp.ss[i]
            ai_new = np.hstack((
                pc.a[i],
                pc.a[i+1] + 2 * ds * pc.b[i+1]))
            bi_new = np.hstack((pc.b[i], pc.b[i+1]))
            ci_new = np.hstack((pc.c[i], pc.c[i+1]))

            assert np.allclose(ai_new, pc_intp.a[i])
            assert np.allclose(bi_new, pc_intp.b[i])
            assert np.allclose(ci_new, pc_intp.c[i])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号