Skip to content

Commit 1083a8d

Browse files
committed
Fix
1 parent aed002f commit 1083a8d

File tree

1 file changed

+14
-25
lines changed

1 file changed

+14
-25
lines changed

test/legacy_test/test_fft_op_0size.py

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,21 @@ def test_zero_size(self):
5050

5151

5252
op_list = [
53-
"fft2",
54-
"fftn",
55-
"fftshift",
56-
"ifft2",
57-
"ifftn",
58-
"ifftshift",
59-
"ihfft2",
60-
"ihfftn",
61-
"rfft2",
62-
"rfftn",
53+
("fft2", ("complex64", "complex128"), ((-2, -1), None)),
54+
("fftn", ("complex64", "complex128"), ((0, 1, 2), None)),
55+
("fftshift", ("complex64", "complex128"), (0, -1)),
56+
("ifft2", ("complex64", "complex128"), ((-2, -1), None)),
57+
("ifftn", ("complex64", "complex128"), ((0, 1, 2), None)),
58+
("ifftshift", ("complex64", "complex128"), (0, -1)),
59+
("ihfft2", ("float32", "float64"), ((-2, -1), None)),
60+
("ihfftn", ("float32", "float64"), ((0, 1, 2), None)),
61+
("rfft2", ("float32", "float64"), ((-2, -1), None)),
62+
("rfftn", ("float32", "float64"), ((0, 1, 2), None)),
6363
]
64-
axes_list = [
65-
((-2, -1), None),
66-
(None, None),
67-
(0, -1),
68-
((-2, -1), None),
69-
(None, None),
70-
(0, -1),
71-
((-2, -1), None),
72-
(None, None),
73-
((-2, -1), None),
74-
(None, None),
75-
]
76-
for i, op_type in enumerate(op_list):
77-
create_test_class(op_type, "complex64", [3, 4, 0], axes_list[i][0])
78-
create_test_class(op_type, "complex128", [3, 4, 0, 3, 4], axes_list[i][1])
64+
65+
for op in op_list:
66+
create_test_class(op[0], op[1][0], [3, 4, 0], op[2][0])
67+
create_test_class(op[0], op[1][1], [3, 4, 0, 3, 4], op[2][1])
7968

8069
if __name__ == '__main__':
8170
unittest.main()

0 commit comments

Comments
 (0)