Skip to content

Commit 74e9189

Browse files
Address PR comments: Remove redundant tests and rename others
Removed Float32HFFT and Float64HFFT as they were duplicates of ComplexFloat versions. Renamed Float32HFFT2/N and Float64HFFT2/N to ComplexFloat... to reflect input type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ef4e90f commit 74e9189

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

test/TorchSharpTest/TestTorchTensor.cs

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6877,32 +6877,6 @@ public void Float64FFT()
68776877
Assert.Equal(ScalarType.ComplexFloat64, inverted.dtype);
68786878
}
68796879

6880-
[Fact]
6881-
[TestOf(nameof(fft.hfft))]
6882-
public void Float32HFFT()
6883-
{
6884-
var input = torch.arange(4, complex64);
6885-
var output = fft.hfft(input);
6886-
Assert.Equal(6, output.shape[0]);
6887-
Assert.Equal(ScalarType.Float32, output.dtype);
6888-
6889-
var inverted = fft.ihfft(output);
6890-
Assert.Equal(ScalarType.ComplexFloat32, inverted.dtype);
6891-
}
6892-
6893-
[Fact]
6894-
[TestOf(nameof(fft.hfft))]
6895-
public void Float64HFFT()
6896-
{
6897-
var input = torch.arange(4, complex128);
6898-
var output = fft.hfft(input);
6899-
Assert.Equal(6, output.shape[0]);
6900-
Assert.Equal(ScalarType.Float64, output.dtype);
6901-
6902-
var inverted = fft.ihfft(output);
6903-
Assert.Equal(ScalarType.ComplexFloat64, inverted.dtype);
6904-
}
6905-
69066880
[Fact]
69076881
[TestOf(nameof(fft.rfft))]
69086882
public void Float32RFFT()
@@ -7140,7 +7114,7 @@ public void Float64RFFTN()
71407114

71417115
[Fact]
71427116
[TestOf(nameof(fft.hfft2))]
7143-
public void Float32HFFT2()
7117+
public void ComplexFloat32HFFT2()
71447118
{
71457119
var input = torch.rand(new long[] { 5, 5, 5, 5 }, complex64);
71467120
var output = fft.hfft2(input);
@@ -7154,7 +7128,7 @@ public void Float32HFFT2()
71547128

71557129
[Fact]
71567130
[TestOf(nameof(fft.hfft2))]
7157-
public void Float64HFFT2()
7131+
public void ComplexFloat64HFFT2()
71587132
{
71597133
var input = torch.rand(new long[] { 5, 5, 5, 5 }, complex128);
71607134
var output = fft.hfft2(input);
@@ -7168,7 +7142,7 @@ public void Float64HFFT2()
71687142

71697143
[Fact]
71707144
[TestOf(nameof(fft.hfftn))]
7171-
public void Float32HFFTN()
7145+
public void ComplexFloat32HFFTN()
71727146
{
71737147
var input = torch.rand(new long[] { 5, 5, 5, 5 }, complex64);
71747148
var output = fft.hfftn(input);
@@ -7182,7 +7156,7 @@ public void Float32HFFTN()
71827156

71837157
[Fact(Skip = "Fails on all Release builds.")]
71847158
[TestOf(nameof(fft.hfftn))]
7185-
public void Float64HFFTN()
7159+
public void ComplexFloat64HFFTN()
71867160
{
71877161
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
71887162

0 commit comments

Comments
 (0)