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])
test_interpolate_constraints.py 文件源码
python
阅读 48
收藏 0
点赞 0
评论 0
评论列表
文章目录