-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Failure: test_noncentral_f in random (Trac #1801) #2394
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
Comments
@cgohlke wrote on 2011-04-17 The following code returns unexpected results with any of my 64 bit msvc9 builds of numpy 1.5.1 or 1.6.x, and also with EPD 7.0-1 64 bit:
Expected result:
The code fails whether MKL is used/linked or not. The 32 bit msvc9 and 64 bit "Windows Server 2003 R2 Platform SDK" builds are OK. So this seems to be a 64 bit msvc9 specific issue. Other numpy.random tests pass with the same seed. Specifically, chisquare and noncentral_chisquare return expected results. The noncentral_f function is implemented in numpy\random\mtrand\distributions.c as
I changed the function to the following, which does return the correct results:
So far I only tested this with numpy-1.5.1.win-amd64-py2.6. |
@rgommers wrote on 2011-04-17 Strange problem. Your change looks OK to me and works with Python 3.1 on OS X. |
@cgohlke wrote on 2011-04-17 Could be that msvc9 compiled code for amd64 executed rk_chisquare() before rk_noncentral_chisquare(), unlike code compiled by other compilers. In that case the following should work reliable (not tested): double rk_noncentral_f(rk_state *state, double dfnum, double dfden, double nonc) |
@cgohlke wrote on 2011-04-18 The attached patch fixes the test failure on win-amd64 and should be safe for all platforms. |
Attachment added by @cgohlke on 2011-04-18: mtrand_distributions.diff |
Original ticket http://projects.scipy.org/numpy/ticket/1801 on 2011-04-17 by @rgommers, assigned to unknown.
Reported by Christoph Gohlke against 1.6.0b2 on 64-bit Windows with MKL. Unlike #2361 this seems to be a real bug, not just about test precision.
Christoph, could you please have a look at this? I haven't got a 64-bit Windows machine available.
The text was updated successfully, but these errors were encountered: