Fixed gradient unit test

This commit is contained in:
Andreas Tsouchlos 2022-11-04 21:35:20 +01:00
parent bf469afbd1
commit 01bc41b8c5

View File

@ -37,9 +37,9 @@ class CheckParityTestCase(unittest.TestCase):
class GradientTestCase(unittest.TestCase):
"""Test case for the calculation of the gradient of the code-constraint-polynomial"""
def test_grad_h(self):
H = np.array([[1, 0, 1],
H = np.array([[1, 0, 0],
[0, 1, 0]])
x = np.array([2, 3, 4])
x = np.array([1, 2, 2])
decoder = proximal.ProximalDecoder(H)
grad = decoder._grad_h(x)