Skip to content

Commit

Permalink
Removed pkgload from numpy - all imports can be done explicitly.
Browse files Browse the repository at this point in the history
  • Loading branch information
pearu committed Jan 5, 2006
1 parent 10d4896 commit c2b11e8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 447 deletions.
44 changes: 11 additions & 33 deletions numpy/__init__.py
Expand Up @@ -20,48 +20,26 @@
NUMPY_IMPORT_VERBOSE = int(os.environ.get('NUMPY_IMPORT_VERBOSE','0'))

try:
from __core_config__ import show as show_core_config
from __config__ import show as show_config
except ImportError:
show_core_config = None
show_config = None

try:
import pkg_resources # activate namespace packages (manipulates __path__)
except ImportError:
pass

import _import_tools
pkgload = _import_tools.PackageLoader()

if show_core_config is None:
print >> sys.stderr, 'Running from numpy core source directory.'
if show_config is None:
print >> sys.stderr, 'Running from numpy source directory.'
else:
from version import version as __version__

pkgload('testing','core','lib','dft','linalg','random',
verbose=NUMPY_IMPORT_VERBOSE)
from testing import ScipyTest
from core import *
from lib import *
from dft import fft, ifft
from random import rand, randn
__all__ = filter(lambda s:not s.startswith('_'),dir())

test = ScipyTest('numpy').test
__all__.append('test')

__numpy_doc__ = """
NumPy: A scientific computing package for Python
================================================
Available subpackages
---------------------
"""

if show_core_config is None:
show_numpy_config = None
else:
try:
from __numpy_config__ import show as show_numpy_config
except ImportError:
show_numpy_config = None


if show_numpy_config is not None:
from numpy_version import numpy_version as __numpy_version__
__doc__ += __numpy_doc__
pkgload(verbose=NUMPY_IMPORT_VERBOSE,postpone=True)
# TODO: Fix __doc__

0 comments on commit c2b11e8

Please sign in to comment.