summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <juliantaylor108@gmail.com>2017-05-09 09:04:11 +0200
committerGitHub <noreply@github.com>2017-05-09 09:04:11 +0200
commit23b0cf3a5925dbc1f0503fbdacdf8088372f4ab5 (patch)
tree2689b9b2864bb36c3ba3fcc4e678cf050db393b9
parent11f3ebf86a16452d0af40b41925b201485ae7f9c (diff)
parent2ff70d0a462f994da84be20b41c0aa00e08594da (diff)
downloadpython-numpy-23b0cf3a5925dbc1f0503fbdacdf8088372f4ab5.tar.gz
python-numpy-23b0cf3a5925dbc1f0503fbdacdf8088372f4ab5.tar.bz2
python-numpy-23b0cf3a5925dbc1f0503fbdacdf8088372f4ab5.zip
Merge pull request #9072 from njsmith/preserve-multiarray-import-error
BUG: if importing multiarray fails, don't discard the error message
-rw-r--r--numpy/core/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/__init__.py b/numpy/core/__init__.py
index ca2f45ece..b3a6967e1 100644
--- a/numpy/core/__init__.py
+++ b/numpy/core/__init__.py
@@ -14,13 +14,15 @@ for envkey in ['OPENBLAS_MAIN_FREE', 'GOTOBLAS_MAIN_FREE']:
try:
from . import multiarray
-except ImportError:
+except ImportError as exc:
msg = """
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
-"""
+
+Original error was: %s
+""" % (exc,)
raise ImportError(msg)
for envkey in env_added: