Skip to content

TST: Clean up of test_pocketfft.py #14200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 5, 2019

Conversation

charris
Copy link
Member

@charris charris commented Aug 5, 2019

Backport of #14178 .

  1. Replaced assert_array_almost_equal with assert_allclose seeing how the use of former is being discouraged.

  2. Fixed a likely typo: raise ValueError -> raise ValueError().

  3. Relaxed test_fft_with_order for float32. Default tolerance of assert_array_almost_equal was not enough for results produced by mkl_fft in single precision, for example.

The tolerance is now set to be proportional to np.sqrt(X.size)*np.finfo(X.dtype).eps based on the following paper.

Infinity norm round-off error of FFT is shown in
G.U. Ramos, "Roundoff Error Analyss of the Fast Fourier Transform,"
Mathematics of Computation, vol. 25, no. 116, Oct. 1971, p. 757

to be bounded by sqrt(N)Keps.

Relaxed test_fft_with_order for float32.

Infinity norm round-off error of FFT is shown in
G.U. Ramos, "Roundoff Error Analyss of the Fast Fourier Transform,"
Mathematics of Computation, vol. 25, no. 116, Oct. 1971, p. 757

to be bounded by sqrt(N)*K*eps.
@charris charris added this to the 1.17.1 release milestone Aug 5, 2019
@charris charris merged commit 9b94f15 into numpy:maintenance/1.17.x Aug 5, 2019
@charris charris deleted the backport-14178 branch August 5, 2019 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants