def test_quartic(self):
expected_l = np.asfortranarray([
[1.0, 0.0, 0.0, 0.0, 0.0],
[1.0, 1.0, 0.0, 0.0, 0.0],
[1.0, 2.0, 1.0, 0.0, 0.0],
[1.0, 3.0, 3.0, 1.0, 0.0],
[1.0, 4.0, 6.0, 4.0, 1.0],
])
expected_r = np.asfortranarray([
[1.0, 4.0, 6.0, 4.0, 1.0],
[0.0, 1.0, 3.0, 3.0, 1.0],
[0.0, 0.0, 1.0, 2.0, 1.0],
[0.0, 0.0, 0.0, 1.0, 1.0],
[0.0, 0.0, 0.0, 0.0, 1.0],
])
row_scaling = np.asfortranarray([[1.0], [2.0], [4.0], [8.0], [16.0]])
expected_l /= row_scaling
expected_r /= row_scaling[::-1, :]
self._helper(4, expected_l, expected_r)
评论列表
文章目录