diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-20 23:40:30 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-20 23:40:30 +0000 |
commit | 7b68d6bf90d88e38d9336ad0db298d2703106792 (patch) | |
tree | 2b9f8c49afd1d2e168adb44e92b7a200d4a3b185 /numpy/__init__.py | |
parent | ee4083f770439ec67e71b45fea68a8369aee57ce (diff) | |
download | numpy-7b68d6bf90d88e38d9336ad0db298d2703106792.tar.gz |
Add explicit imports patch in #193
Diffstat (limited to 'numpy/__init__.py')
-rw-r--r-- | numpy/__init__.py | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index 34a009649..d83ff5172 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -3,15 +3,16 @@ NumPy ========== You can support the development of NumPy and SciPy by purchasing -extended documentation at +"Guide to NumPy" at http://www.trelgol.com -It is being distributed for a fee for a limited time to try and raise -money for development. +It is being distributed for a fee for only a limited time to +cover some of the costs of development. -Documentation is also available in the docstrings. +Documentation is also available in the docstrings and at +http://www.scipy.org. """ try: @@ -26,22 +27,51 @@ if show_config is None: else: from version import version as __version__ - import os as _os - NUMPY_IMPORT_VERBOSE = int(_os.environ.get('NUMPY_IMPORT_VERBOSE','0')) - del _os from _import_tools import PackageLoader pkgload = PackageLoader() - pkgload('testing','core','lib','linalg','dft','random','f2py', - verbose=NUMPY_IMPORT_VERBOSE,postpone=False) + + import testing + from testing import ScipyTest, NumpyTest + import core + from core import * + import lib + from lib import * + import linalg + import dft + import random + + __all__ = ['__version__', 'pkgload', 'PackageLoader', + 'ScipyTest', 'NumpyTest', 'show_config'] + __all__ += core.__all__ + __all__ += lib.__all__ + __all__ += ['linalg', 'dft', 'random'] if __doc__ is not None: __doc__ += """ Available subpackages --------------------- +core --- Defines a multi-dimensional array and useful procedures + for Numerical computation. +lib --- Basic functions used by several sub-packages and useful + to have in the main name-space. +random --- Core Random Tools +linalg --- Core Linear Algebra Tools +dft --- Core FFT routines +testing --- Scipy testing tools + + These packages require explicit import +f2py --- Fortran to Python Interface Generator. +distutils --- Enhancements to distutils with support for + Fortran compilers support and more. + + +Global symbols from subpackages +------------------------------- +core --> * +lib --> * +testing --> ScipyTest, NumpyTest """ - if __doc__ is not None: - __doc__ += pkgload.get_pkgdocs() def test(level=1, verbosity=1): return NumpyTest().test(level, verbosity) @@ -49,6 +79,8 @@ Available subpackages import add_newdocs + __all__.extend(['add_newdocs','test']) + if __doc__ is not None: __doc__ += """ @@ -59,10 +91,6 @@ Utility tools pkgload --- Load numpy packages show_config --- Show numpy build configuration dual --- Overwrite certain functions with high-performance Scipy tools + matlib --- Make everything matrices. __version__ --- Numpy version string - -Environment variables ---------------------- - - NUMPY_IMPORT_VERBOSE --- pkgload verbose flag, default is 0. """ |