diff options
Diffstat (limited to 'numpy/__init__.py')
-rw-r--r-- | numpy/__init__.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index 706959e90..107afcd00 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -16,8 +16,9 @@ Available subpackages --------------------- """ -import os, sys -NUMPY_IMPORT_VERBOSE = int(os.environ.get('NUMPY_IMPORT_VERBOSE','0')) +import os as _os +import sys as _sys +NUMPY_IMPORT_VERBOSE = int(_os.environ.get('NUMPY_IMPORT_VERBOSE','0')) try: from __config__ import show as show_config @@ -25,12 +26,13 @@ except ImportError: show_config = None try: - import pkg_resources # activate namespace packages (manipulates __path__) + import pkg_resources as _pk # activate namespace packages (manipulates __path__) + del _pk except ImportError: pass if show_config is None: - print >> sys.stderr, 'Running from numpy source directory.' + print >> _sys.stderr, 'Running from numpy source directory.' else: from version import version as __version__ from testing import ScipyTest @@ -38,6 +40,11 @@ else: from lib import * from dft import fft, ifft from random import rand, randn + + __all__ = ['ScipyTest','fft','ifft','rand','randn'] + __all__ += core.__all__ + __all__ += lib.__all__ + __all__ = filter(lambda s:not s.startswith('_'),dir()) test = ScipyTest('numpy').test @@ -45,3 +52,5 @@ else: import add_newdocs # TODO: Fix __doc__ + +del _os, _sys |