2
SciPy --- A scientific computing package for Python
3
===================================================
5
You can support the development of SciPy by purchasing documentation
10
It is being distributed for a fee for a limited time to try and raise
11
money for development.
13
Documentation is also available in the docstrings.
18
import pkg_resources as _pr # activate namespace packages (manipulates __path__)
23
__all__ = ['pkgload','test']
25
from numpy import show_config as show_numpy_config
26
if show_numpy_config is None:
27
raise ImportError,"Cannot import scipy when running from numpy source directory."
28
from numpy import __version__ as __numpy_version__
30
# Import numpy symbols to scipy name space
32
from numpy import oldnumeric
34
from numpy.random import rand, randn
35
from numpy.fft import fft, ifft
36
from numpy.lib.scimath import *
37
_num.seterr(all='ignore')
39
__all__ += ['oldnumeric']+_num.__all__
41
__all__ += ['randn', 'rand', 'fft', 'ifft']
50
# Remove the linalg imported from numpy so that the scipy.linalg package can be
54
from __config__ import show as show_config
55
from version import version as __version__
57
# Load scipy packages, their global_symbols, set up __doc__ string.
58
from numpy._import_tools import PackageLoader
60
SCIPY_IMPORT_VERBOSE = int(_os.environ.get('SCIPY_IMPORT_VERBOSE','-1'))
62
pkgload = PackageLoader()
63
pkgload(verbose=SCIPY_IMPORT_VERBOSE,postpone=True)
69
__doc__ += pkgload.get_pkgdocs()
72
def test(level=1, verbosity=1):
73
""" Run Scipy tests suite with level and verbosity."""
74
from numpy.testing import NumpyTest
77
return NumpyTest(scipy).test(level, verbosity)
84
test --- Run scipy unittests
85
pkgload --- Load scipy packages
86
show_config --- Show scipy build configuration
87
show_numpy_config --- Show numpy build configuration
88
__version__ --- Scipy version string
89
__numpy_version__ --- Numpy version string
94
SCIPY_IMPORT_VERBOSE --- pkgload verbose flag, default is 0.