We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad9ec16 commit 5d7cc1bCopy full SHA for 5d7cc1b
nibabel/__init__.py
@@ -56,9 +56,14 @@
56
from .imageclasses import class_map, ext_map
57
from . import trackvis
58
59
-from numpy.testing import Tester
60
-test = Tester().test
61
-del Tester
+# be friendly on systems with ancient numpy -- no tests, but at least
+# importable
+try:
62
+ from numpy.testing import Tester
63
+ test = Tester().test
64
+ del Tester
65
+except ImportError:
66
+ def test(*args, **kwargs): raise RuntimeError('Need numpy >= 1.2 for tests')
67
68
from .pkg_info import get_pkg_info as _get_pkg_info
69
get_info = lambda : _get_pkg_info(os.path.dirname(__file__))
0 commit comments