MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / test_dft

Function test_dft

numpy_ml/tests/test_preprocessing.py:135–147  ·  view source on GitHub ↗
(N=15)

Source from the content-addressed store, hash-verified

133
134
135def test_dft(N=15):
136 np.random.seed(12345)
137
138 i = 0
139 while i < N:
140 N = np.random.randint(2, 100)
141 signal = np.random.rand(N)
142 mine = DFT(signal)
143 theirs = np.fft.rfft(signal)
144
145 np.testing.assert_almost_equal(mine.real, theirs.real)
146 print("PASSED")
147 i += 1
148
149
150def test_mfcc(N=1):

Callers

nothing calls this directly

Calls 1

DFTFunction · 0.90

Tested by

no test coverage detected