-
Notifications
You must be signed in to change notification settings - Fork 220
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
Lambert W function in Scipy 0.16.0 on Linux returns NaN #425
Comments
This issue is still occurring on Linux. Is there any progress or update to fixing it? |
@bryanwweber I don't think this is specific to the anaconda distribution, so I don't know if you're going to find help here. see scipy/scipy#4443. I got here after googling and hoping that maybe somebody got around to fixing it. |
@wholmgren I do think this is Anaconda-specific. With some output simplified:
Tested on Ubuntu 14.04 with Conda 3.18.1. |
Well, I just verified that the problem remains when I install numpy and scipy using pip. My |
Interesting... The conda gcc is 4.8.5 and my system gcc is 4.4.7. I should also note that the conda gcc package brings along some additional stuff. |
@wholmgren My system GCC is 4.8.4. Perhaps the version of GCC Continuum use to compile SciPy is out of date? |
Seems likely. I found some other potentially related gcc 4.4.7 problems on the scipy issues board: scipy/scipy#3794 scipy/scipy#3568. I'm also guessing that nobody at continuum is going to see this. Maybe try posting to their google groups page with a link to this issue? https://groups.google.com/a/continuum.io/forum/#!forum/anaconda |
@bryanwweber I didn't want to hijack your issue but I figured that I'd go ahead and post it: https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/oQmTd3gpyfE |
Hi, just a reassuring note that people at Continuum have seen this, and Thanks for your help in identifying the issue to a compiler version On Tue, Oct 13, 2015 at 5:38 PM Will Holmgren notifications@github.com
|
@msarahan Thank you for the quick response! |
@wholmgren @msarahan Thanks for responding and following up on this! |
This issue should be fixed in the next SciPy release. As a workaround for the current SciPy versions in Anaconda, optimizations based on strict aliasing rules should be disabled for the This can be done by adding the gcc compiler option diff --git a/scipy/special/setup.py b/scipy/special/setup.py
index e5efb2e..e7f9c7a 100755
--- a/scipy/special/setup.py
+++ b/scipy/special/setup.py
@@ -78,10 +78,11 @@ def configuration(parent_package='',top_path=None):
cfg = dict(get_system_info('lapack_opt'))
cfg.setdefault('include_dirs', []).extend([curdir] + inc_dirs + [numpy.get_include()])
cfg.setdefault('libraries', []).extend(['sc_amos','sc_c_misc','sc_cephes','sc_mach',
'sc_cdf', 'sc_specfun'])
cfg.setdefault('define_macros', []).extend(define_macros)
+ cfg.setdefault('extra_compile_args', []).extend(['-fno-strict-aliasing'])
config.add_extension('_ufuncs',
depends=ufuncs_dep,
sources=ufuncs_src,
extra_info=get_info("npymath"),
**cfg) It would be nice if you could rebuild the Anaconda |
this looks to be fixed already? |
This should have been fixed by scipy/scipy#6074, +1 for closing |
The
lambertw
function in Scipy 0.16.0 for Python 3.4.3 returns NaN, no matter the input value. This only happens for Linux (I tested on Ubuntu 14.04), no problems on Windows. Furthermore, buildingnumpy
andscipy
myself resolves the issue. Thelambertw
tests in scipy also fail. See also: http://stackoverflow.com/questions/30792319/anaconda3-scipy-special-lambertw-function-return-nanThe text was updated successfully, but these errors were encountered: