@@ -65,6 +65,12 @@ def test_scipy_rfft(norm, dtype):
65
65
xx = mfi .scipy_fft .irfft (w , n = x .shape [0 ], norm = norm , workers = None , plan = None )
66
66
tol = 64 * np .finfo (np .dtype (dtype )).eps
67
67
assert np .allclose (x , xx , atol = tol , rtol = tol )
68
+
69
+ x = np .ones (510 , dtype = dtype )
70
+ w = mfi .scipy_fft .rfft (x , norm = norm , workers = None , plan = None )
71
+ xx = mfi .scipy_fft .irfft (w , norm = norm , workers = None , plan = None )
72
+ tol = 64 * np .finfo (np .dtype (dtype )).eps
73
+ assert np .allclose (x , xx , atol = tol , rtol = tol )
68
74
69
75
70
76
@pytest .mark .parametrize ('norm' , [None , "forward" , "backward" , "ortho" ])
@@ -99,20 +105,26 @@ def test_numpy_fftn(norm, dtype):
99
105
100
106
@pytest .mark .parametrize ('norm' , [None , "forward" , "backward" , "ortho" ])
101
107
@pytest .mark .parametrize ('dtype' , [np .float32 , np .float64 ])
102
- def test_scipy_rftn (norm , dtype ):
108
+ def test_scipy_rfftn (norm , dtype ):
103
109
x = np .ones ((37 , 83 ), dtype = dtype )
104
110
w = mfi .scipy_fft .rfftn (x , norm = norm , workers = None , plan = None )
105
- xx = mfi .scipy_fft .ifftn (w , s = x .shape , norm = norm , workers = None , plan = None )
111
+ xx = mfi .scipy_fft .irfftn (w , s = x .shape , norm = norm , workers = None , plan = None )
112
+ tol = 64 * np .finfo (np .dtype (dtype )).eps
113
+ assert np .allclose (x , xx , atol = tol , rtol = tol )
114
+
115
+ x = np .ones ((36 , 82 ), dtype = dtype )
116
+ w = mfi .scipy_fft .rfftn (x , norm = norm , workers = None , plan = None )
117
+ xx = mfi .scipy_fft .irfftn (w , norm = norm , workers = None , plan = None )
106
118
tol = 64 * np .finfo (np .dtype (dtype )).eps
107
119
assert np .allclose (x , xx , atol = tol , rtol = tol )
108
120
109
121
110
122
@pytest .mark .parametrize ('norm' , [None , "forward" , "backward" , "ortho" ])
111
123
@pytest .mark .parametrize ('dtype' , [np .float32 , np .float64 ])
112
- def test_numpy_rftn (norm , dtype ):
124
+ def test_numpy_rfftn (norm , dtype ):
113
125
x = np .ones ((37 , 83 ), dtype = dtype )
114
126
w = mfi .numpy_fft .rfftn (x , norm = norm )
115
- xx = mfi .numpy_fft .ifftn (w , s = x .shape , norm = norm )
127
+ xx = mfi .numpy_fft .irfftn (w , s = x .shape , norm = norm )
116
128
tol = 64 * np .finfo (np .dtype (dtype )).eps
117
129
assert np .allclose (x , xx , atol = tol , rtol = tol )
118
130
0 commit comments