Skip to content

Commit 64c36f5

Browse files
Fix upper cholesky assertion
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f7ad367 commit 64c36f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/TorchSharpTest/LinearAlgebra.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public void CholeskyUpperTest()
316316
#pragma warning restore CS0618
317317

318318
// U should be upper-triangular: for real inputs U^T * U == A (more generally, U^H * U == A)
319-
Assert.True(a.allclose(u.swapaxes(-2, -1).matmul(u)));
319+
Assert.True(a.allclose(u.mH.matmul(u)));
320320
}
321321

322322
[Fact]

0 commit comments

Comments
 (0)