Skip to content

Commit ff3c8d9

Browse files
Fix Float32HFFTN test to call hfftn instead of hfft2
The test method was incorrectly calling fft.hfft2() instead of fft.hfftn(), and using ihfft2() instead of ihfftn() for verification. Updated the TestOf attribute to match the correct function being tested. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 95d6d4d commit ff3c8d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/TorchSharpTest/TestTorchTensor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7228,15 +7228,15 @@ public void Float64HFFT2()
72287228
}
72297229

72307230
[Fact]
7231-
[TestOf(nameof(fft.hfft2))]
7231+
[TestOf(nameof(fft.hfftn))]
72327232
public void Float32HFFTN()
72337233
{
72347234
var input = torch.rand(new long[] { 5, 5, 5, 5 }, complex64);
7235-
var output = fft.hfft2(input);
7235+
var output = fft.hfftn(input);
72367236
Assert.Equal(new long[] { 5, 5, 5, 8 }, output.shape);
72377237
Assert.Equal(ScalarType.Float32, output.dtype);
72387238

7239-
var inverted = fft.ihfft2(output);
7239+
var inverted = fft.ihfftn(output);
72407240
Assert.Equal(new long[] { 5, 5, 5, 5 }, inverted.shape);
72417241
Assert.Equal(ScalarType.ComplexFloat32, inverted.dtype);
72427242
}

0 commit comments

Comments
 (0)