@@ -113,8 +113,8 @@ def test_matrix5(self):
113
113
mkl_fft .fftn (y [i0 , :, : , i3 ]),
114
114
rtol = r_tol , atol = a_tol
115
115
)
116
-
117
-
116
+
117
+
118
118
119
119
120
120
class Test_Regressions (TestCase ):
@@ -147,6 +147,16 @@ def test_rfftn_numpy(self):
147
147
tr_rfft = np .transpose (mkl_fft .rfftn_numpy (x , axes = a ), a )
148
148
assert_allclose (rfft_tr , tr_rfft , rtol = r_tol , atol = a_tol )
149
149
150
+ def test_gh64 (self ):
151
+ """Test example from #64"""
152
+ a = np .arange (12 ).reshape ((3 ,4 ))
153
+ x = a .astype (np .cdouble )
154
+ # should executed successfully
155
+ r1 = mkl_fft .fftn (a , shape = None , axes = (- 2 ,- 1 ))
156
+ r2 = mkl_fft .fftn (x )
157
+ r_tol , a_tol = _get_rtol_atol (x )
158
+ assert_allclose (r1 , r2 , rtol = r_tol , atol = a_tol )
159
+
150
160
151
161
class Test_Scales (TestCase ):
152
162
def setUp (self ):
@@ -185,7 +195,7 @@ def test_scale_nd(self):
185
195
X .flat [:] = np .cbrt (np .arange (0 , X .size , dtype = X .dtype ))
186
196
f = mkl_fft .fftn (X )
187
197
f_scale = mkl_fft .fftn (X , forward_scale = 0.2 )
188
-
198
+
189
199
r_tol , a_tol = _get_rtol_atol (X )
190
200
assert_allclose (f , 5 * f_scale , rtol = r_tol , atol = a_tol )
191
201
@@ -194,7 +204,6 @@ def test_scale_nd_axes(self):
194
204
X .flat [:] = np .cbrt (np .arange (X .size , dtype = X .dtype ))
195
205
f = mkl_fft .fftn (X , axes = (0 , 1 , 2 , 3 ))
196
206
f_scale = mkl_fft .fftn (X , axes = (0 , 1 , 2 , 3 ), forward_scale = 0.2 )
197
-
207
+
198
208
r_tol , a_tol = _get_rtol_atol (X )
199
209
assert_allclose (f , 5 * f_scale , rtol = r_tol , atol = a_tol )
200
-
0 commit comments