Skip to content

Commit

Permalink
add more test cases for fftshift/ifftshift
Browse files Browse the repository at this point in the history
  • Loading branch information
chenfeiyu authored and cxxly committed Oct 26, 2021
1 parent 6e2fa31 commit c5d92f3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/paddle/fluid/tests/unittests/fft/test_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,10 +1009,11 @@ def test_rfftfreq(self):


@place(DEVICES)
@parameterize((TEST_CASE_NAME, 'x', 'axes', 'dtype'), [
('test_1d', np.random.randn(10), (0, ), 'float64'),
('test_2d', np.random.randn(10, 10), (0, 1), 'float64'),
])
@parameterize(
(TEST_CASE_NAME, 'x', 'axes', 'dtype'),
[('test_1d', np.random.randn(10), (0, ), 'float64'),
('test_2d', np.random.randn(10, 10), (0, 1), 'float64'),
('test_2d_with_all_axes', np.random.randn(10, 10), None, 'float64')])
class TestFftShift(unittest.TestCase):
def test_fftshift(self):
"""Test fftshift with norm condition
Expand All @@ -1030,6 +1031,7 @@ def test_fftshift(self):
@parameterize((TEST_CASE_NAME, 'x', 'axes'), [
('test_1d', np.random.randn(10), (0, ), 'float64'),
('test_2d', np.random.randn(10, 10), (0, 1), 'float64'),
('test_2d_with_all_axes', np.random.randn(10, 10), None, 'float64'),
])
class TestIfftShift(unittest.TestCase):
def test_ifftshift(self):
Expand Down

1 comment on commit c5d92f3

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.