5
You can support the development of NumPy and SciPy by purchasing
6
the book "Guide to NumPy" at
10
It is being distributed for a fee for only a few years to
11
cover some of the costs of development. After the restriction period
12
it will also be freely available.
14
Additional documentation is available in the docstrings and at
6
1. An array object of arbitrary homogeneous items
7
2. Fast mathematical operations over arrays
8
3. Linear Algebra, Fourier Transforms, Random Number Generation
10
Documentation is available in the docstrings and at http://www.scipy.org
15
Defines a multi-dimensional array and useful procedures
16
for Numerical computation.
18
Basic functions used by several sub-packages and useful
19
to have in the main name-space.
23
Core Linear Algebra Tools
29
The following sub-packages must be explicitly imported:
32
Fortran to Python Interface Generator.
34
Enhancements to distutils with support for
35
Fortran compilers support and more.
38
Global symbols from subpackages
39
-------------------------------
40
======== =================================
41
core all (use numpy.* not numpy.core.*)
42
lib all (use numpy.* not numpy.lib.*)
44
======== =================================
55
Show numpy build configuration
57
Overwrite certain functions with high-performance Scipy tools
59
Make everything matrices.
65
# We first need to detect if we're being called as part of the numpy setup
66
# procedure itself in a reliable manner.
20
from __config__ import show as show_config
24
if show_config is None:
70
__NUMPY_SETUP__ = False
26
75
print >> _sys.stderr, 'Running from numpy source directory.'
79
from numpy.__config__ import show as show_config
80
except ImportError, e:
81
msg = """Error importing numpy: you should not try to import numpy from
82
its source directory; please exit the numpy source tree, and relaunch
83
your python intepreter from there."""
84
raise ImportError(msg)
29
85
from version import version as __version__
31
87
from _import_tools import PackageLoader
32
pkgload = PackageLoader()
89
def pkgload(*packages, **options):
90
loader = PackageLoader(infunc=True)
91
return loader(*packages, **options)
94
__all__ = ['add_newdocs']
96
pkgload.__doc__ = PackageLoader.__call__.__doc__
35
98
from testing import ScipyTest, NumpyTest
48
112
object, unicode, str
49
113
from core import round, abs, max, min
51
__all__ = ['__version__', 'pkgload', 'PackageLoader',
52
'ScipyTest', 'NumpyTest', 'show_config']
53
__all__ += core.__all__
54
__all__ += lib.__all__
55
__all__ += ['linalg', 'fft', 'random', 'ctypeslib']
57
if __doc__ is not None:
62
core --- Defines a multi-dimensional array and useful procedures
63
for Numerical computation.
64
lib --- Basic functions used by several sub-packages and useful
65
to have in the main name-space.
66
random --- Core Random Tools
67
linalg --- Core Linear Algebra Tools
68
fft --- Core FFT routines
69
testing --- Scipy testing tools
71
These packages require explicit import
72
f2py --- Fortran to Python Interface Generator.
73
distutils --- Enhancements to distutils with support for
74
Fortran compilers support and more.
77
Global symbols from subpackages
78
-------------------------------
81
testing --> ScipyTest, NumpyTest
84
def test(level=1, verbosity=1):
86
return NumpyTest().test(level, verbosity)
88
return NumpyTest().testall(level, verbosity)
115
__all__.extend(['__version__', 'pkgload', 'PackageLoader',
116
'ScipyTest', 'NumpyTest', 'show_config'])
117
__all__.extend(core.__all__)
118
__all__.extend(lib.__all__)
119
__all__.extend(['linalg', 'fft', 'random', 'ctypeslib'])
121
def test(*args, **kw):
123
print 'Numpy is installed in %s' % (os.path.split(__file__)[0],)
124
print 'Numpy version %s' % (__version__,)
125
print 'Python version %s' % (sys.version.replace('\n', '',),)
126
return NumpyTest().test(*args, **kw)
89
127
test.__doc__ = NumpyTest.test.__doc__
93
__all__.extend(['add_newdocs','test'])
95
if __doc__ is not None:
101
test --- Run numpy unittests
102
pkgload --- Load numpy packages
103
show_config --- Show numpy build configuration
104
dual --- Overwrite certain functions with high-performance Scipy tools
105
matlib --- Make everything matrices.
106
__version__ --- Numpy version string