summaryrefslogtreecommitdiff
path: root/numpy/__init__.py
blob: 96edd88c23df9c45bb57b03f45b0d74423944996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
"""\
NumPy
==========

You can support the development of NumPy and SciPy by purchasing
documentation at

  http://www.trelgol.com

It is being distributed for a fee for a limited time to try and raise
money for development.

Documentation is also available in the docstrings.

"""

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

if show_config is None:
    import sys as _sys
    print >> _sys.stderr, 'Running from numpy source directory.'
    del _sys
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)

    if __doc__ is not None:
        __doc__ += """

Available subpackages
---------------------
"""
    if __doc__ is not None:
        __doc__ += pkgload.get_pkgdocs()

    def test(level=1, verbosity=1):
        return NumpyTest().test(level, verbosity)

    import add_newdocs

    if __doc__ is not None:
        __doc__ += """

Utility tools
-------------

  test        --- Run numpy unittests
  pkgload     --- Load numpy packages
  show_config --- Show numpy build configuration
  dual        --- Overwrite certain functions with high-performance Scipy tools
  __version__ --- Numpy version string

Environment variables
---------------------

  NUMPY_IMPORT_VERBOSE --- pkgload verbose flag, default is 0.
"""