Skip to content

Commit 01ad727

Browse files
added a test against issue/37
1 parent c941c47 commit 01ad727

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mkl_fft/tests/test_fftnd.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,13 @@ def test_cf_contig(self):
119119
f1 = mkl_fft.fft(d_ccont, axis=a)
120120
f2 = mkl_fft.fft(d_fcont, axis=a)
121121
assert_allclose(f1, f2, rtol=r_tol, atol=a_tol)
122+
123+
def test_rfftn_numpy(self):
124+
"""Test that rfftn_numpy works as expected"""
125+
axes = [(0, 1, 2), (0, 2, 1), (1, 0, 2), (1, 2, 0), (2, 0, 1), (2, 1, 0)]
126+
for x in [self.ad, self.af]:
127+
for a in axes:
128+
r_tol, a_tol = _get_rtol_atol(x)
129+
rfft_tr = mkl_fft.rfftn_numpy(np.transpose(x, a))
130+
tr_rfft = np.transpose(mkl_fft.rfftn_numpy(x, axes=a), a)
131+
assert_allclose(rfft_tr, tr_rfft, rtol=r_tol, atol=a_tol)

0 commit comments

Comments
 (0)