def test_real_ifft(self): for data in generate_inputs(self.__number_inputs, self.__minimum_size, self.__maximum_size): forward = spectral.rfft(data) generated = spectral.irfft(forward) reference = np.fft.irfft(forward) np.testing.assert_array_almost_equal(generated, reference)
def test_hartley(self): for data in generate_inputs(self.__number_inputs, self.__minimum_size, self.__maximum_size): reference = spectral.hartley(data) temporal = spectral.rfft(data) generated = np.real(temporal) - np.imag(temporal) np.testing.assert_array_almost_equal(reference[:len(generated)], generated)