/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/core/getlimits.py:82:
RuntimeWarning: invalid value encountered in power
self.resolution = float_to_float(float_conv(10) ** (-self.precision))
That message is all I get on the console. It is a warning, not error, so there is no stack trace.
Here it is in context:
Number of registered modules: 146
/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/core/getlimits.py:82: RuntimeWarning: invalid value encountered in power
self.resolution = float_to_float(float_conv(10) ** (-self.precision))
Number of instantiated modules: 146
Is there a call stack to see where the problem originates from? If not, then you could add raise Exception() before the referenced line in getlimits.py to raise an exception and get a call stack.
After adding raise Exception(), here is the stack trace. The warning is triggered on import numpy
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Applications/Slicer.app/Contents/lib/Slicer-4.7/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 1, in <module>
import numpy
File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/__init__.py", line 142, in <module>
from . import add_newdocs
File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/core/__init__.py", line 51, in <module>
from . import getlimits
File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/core/getlimits.py", line 126, in <module>
tiny=_f16(2 ** -14))
File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-macosx-10.6-x86_64.egg/numpy/core/getlimits.py", line 82, in __init__
raise Exception()
Exception
Thank you. There is nothing particularly suspicious in this call stack. Maybe instead of throwing an exception, you could print the call stack and let the execution continue:
import traceback
traceback.print_stack()
This way we could see which call stack corresponds to the warning message (there may be several calls without warnings but after one of them the warning message will be printed as well).
We could also print some variables, such as self.eps and self.precision.
Do you have this warning by simply installing the latest nightly version of Slicer, without installing any extensions? There is no such warning on Windows.
FWIW I don’t get this error on my mac local build after upgrading to numpy 1.13.1. (Note: to test new numpy you need to delete it from site-package before rebuilding).