Repository navigation
analytic_functions: Skip Tests on windows - #4275
MSeifert04 wants to merge 1 commit into
Conversation
|
Hmm, @embray said it didn't fail on his Windows machine. |
|
Anyways, I looked at the tests on #4171 and posted my comment there. I am okay with skipping them on Windows. |
|
I don't think we should skip these - it's not like the precision is off, some values are actually NaN instead of zero which doesn't seem ideal. |
|
@MSeifert04 @lingxz - just to see if we can diagnose the issue, can you let me know the output of: import numpy as np
print(np.expm1(14387.))
print(1 / np.expm1(14387.))
print(np.__version__)On your Windows machines where these tests fail? |
|
(by the way, I realize now that we are skipping these tests on AppVeyor, but before we extend to all Windows, let's see if we can figure out why these don't work) |
|
Sorry I completely forgot about this. I tested it with all my avaiably environments and the problem is windows together with python < 3.5. With python 3.5 the output is like expected and the tests do not fail. Here the longish outputs: Python 3.5 But with python 2.7 and python 3.4 the test fails: and the output for you suggestion was: |
|
Note for bookkeeping purposes: this partially addresses the issues in #3242 |
|
Thanks, @MSeifert04 . I think you made it pretty clear that we can indeed skip the tests on Windows if Python version is < 3.5. @astrofrog , do you agree? |
|
I was able to reproduce these failures on Anaconda (thanks @pllim for pointing out this thread to me). In the meantime let me see if I can actually debug what's going on here. |
|
@embray , to reiterate @MSeifert04 above, I think he explained why, no? In Python 2.7 and 3.4 (failed): In [4]: print(np.expm1(14387.))
C:\Programming\Anaconda\envs\py34\Scripts\ipython-script.py:1: RuntimeWarning: overflow encountered in expm1
if __name__ == '__main__':
C:\Programming\Anaconda\envs\py34\Scripts\ipython-script.py:1: RuntimeWarning: invalid value encountered in expm1
if __name__ == '__main__':
nan
In [5]: print(1 / np.expm1(14387.))
C:\Programming\Anaconda\envs\py34\Scripts\ipython-script.py:1: RuntimeWarning: overflow encountered in expm1
if __name__ == '__main__':
C:\Programming\Anaconda\envs\py34\Scripts\ipython-script.py:1: RuntimeWarning: invalid value encountered in expm1
if __name__ == '__main__':
nan
In [6]: print(np.__version__)
1.10.1In Python 3.5 (passed): In [2]: print(np.expm1(14387.))
C:\Programming\Anaconda\Scripts\ipython-script.py:1: RuntimeWarning: overflow encountered in expm1
if __name__ == '__main__':
inf
In [3]: print(1 / np.expm1(14387.))
C:\Programming\Anaconda\Scripts\ipython-script.py:1: RuntimeWarning: overflow encountered in expm1
if __name__ == '__main__':
0.0
In [4]: print(np.__version__)
1.10.1 |
|
Well, right, the difference is that in one case Then we might update the code to work around this bug. That is, compute |
|
This seems to be the most relevant, but I don't understand why I'm encountering the issue in this case: numpy/numpy#4416 |
|
Another thing I noticed is that on platforms where it's failing there's an additional that doesn't happen otherwise. So somewhere in the The other wrinkle is that Numpy provides its own implementation of |
|
Aha, this is the very bug: https://sourceware.org/bugzilla/show_bug.cgi?id=6814 |
|
👍 |
|
@embray: Definitly better than just to skip/xfail the tests. If you want you can close my PR. :-) |
|
Fixed (well, still a workaround) the underlying issue in #4393. |
I'm not really sure if that change makes sense. But the tests that are marked to
xfailon AppVeyor are tried on windows - I'm not sure that's meant to be but I guess not.At least if I start the tests with
python setup.py testandimport astropy; astropy.test()the tests inanalytic_functionsfail (Finstead ofx) on my windows computer.closes #4171