test__curve_helpers.py 文件源码

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

项目:bezier 作者: dhermes 项目源码 文件源码
def test_non_unity(self):
        nodes = np.asfortranarray([
            [0.0, 0.0, 0.0],
            [0.5, 3.0, 1.0],
            [1.5, 4.0, 1.0],
            [2.0, 8.0, 1.0],
        ])
        lambda1 = np.asfortranarray([0.25, 0.5, 0.75])
        lambda2 = np.asfortranarray([0.25, 0.125, -0.75])

        result = self._call_function_under_test(nodes, lambda1, lambda2)
        expected = np.asfortranarray([
            [0.125, 0.453125, 0.109375],
            [0.0859375, 0.390625, 0.119140625],
            [0.421875, -2.109375, -0.421875],
        ])
        self.assertEqual(result, expected)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号