diff --git a/tests/python/linalg/givens_test.py b/tests/python/linalg/givens_test.py index 304584ddd..ff3c9c5de 100644 --- a/tests/python/linalg/givens_test.py +++ b/tests/python/linalg/givens_test.py @@ -53,11 +53,9 @@ def test_givens_decomposition_reconstruct(dim: int): for i, phase_shift in enumerate(phase_shifts): reconstructed[i] *= phase_shift for c, s, i, j in givens_rotations[::-1]: - reconstructed = reconstructed.T.copy() - reconstructed[j], reconstructed[i] = zrot( - reconstructed[j], reconstructed[i], c, s.conjugate() + reconstructed[:, j], reconstructed[:, i] = zrot( + reconstructed[:, j], reconstructed[:, i], c, s.conjugate() ) - reconstructed = reconstructed.T np.testing.assert_allclose(reconstructed, mat)