diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2008-07-09 08:13:18 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2008-07-09 08:13:18 +0000 |
commit | c114dd8293e5ab72b57f3810df476b6528966d4f (patch) | |
tree | 5c363dd738d3de585ef0f3579cb564aeb20aae96 | |
parent | 89bdcf9a990f5aa44b9830ae366f3c02f7b5bd7a (diff) | |
download | numpy-c114dd8293e5ab72b57f3810df476b6528966d4f.tar.gz |
Add numpy.doc topical documentation framework.
-rw-r--r-- | numpy/__init__.py | 3 | ||||
-rw-r--r-- | numpy/doc/__init__.py | 2 | ||||
-rw-r--r-- | numpy/doc/reference/__init__.py | 11 | ||||
-rw-r--r-- | numpy/doc/reference/broadcasting.py | 9 | ||||
-rw-r--r-- | numpy/doc/reference/indexing.py | 9 | ||||
-rw-r--r-- | numpy/setup.py | 2 |
6 files changed, 35 insertions, 1 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index def3cac27..eac45af4a 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -108,6 +108,7 @@ else: import random import ctypeslib import ma + import doc # Make these accessible from numpy name-space # but not imported in from numpy import * @@ -119,5 +120,5 @@ else: 'show_config']) __all__.extend(core.__all__) __all__.extend(lib.__all__) - __all__.extend(['linalg', 'fft', 'random', 'ctypeslib', 'ma']) + __all__.extend(['linalg', 'fft', 'random', 'ctypeslib', 'ma', 'doc']) diff --git a/numpy/doc/__init__.py b/numpy/doc/__init__.py new file mode 100644 index 000000000..394f0b548 --- /dev/null +++ b/numpy/doc/__init__.py @@ -0,0 +1,2 @@ +from numpy.doc.reference import * +del reference diff --git a/numpy/doc/reference/__init__.py b/numpy/doc/reference/__init__.py new file mode 100644 index 000000000..c64a6fb0a --- /dev/null +++ b/numpy/doc/reference/__init__.py @@ -0,0 +1,11 @@ +import os + +ref_dir = os.path.join(os.path.dirname(__file__)) + +__all__ = [f[:-3] for f in os.listdir(ref_dir) if f.endswith('.py') and + not f.startswith('__')] + +__doc__ = 'The following topics are available:\n' + \ + '\n - '.join([''] + __all__) + +__all__.extend(['__doc__']) diff --git a/numpy/doc/reference/broadcasting.py b/numpy/doc/reference/broadcasting.py new file mode 100644 index 000000000..797d0edba --- /dev/null +++ b/numpy/doc/reference/broadcasting.py @@ -0,0 +1,9 @@ +""" + +======================== +Broadcasting over arrays +======================== + +Placeholder for broadcasting documentation. + +""" diff --git a/numpy/doc/reference/indexing.py b/numpy/doc/reference/indexing.py new file mode 100644 index 000000000..bc13611e8 --- /dev/null +++ b/numpy/doc/reference/indexing.py @@ -0,0 +1,9 @@ +""" + +============== +Array indexing +============== + +Placeholder for array indexing documentation. + +""" diff --git a/numpy/setup.py b/numpy/setup.py index 40375651f..c081c9c44 100644 --- a/numpy/setup.py +++ b/numpy/setup.py @@ -14,6 +14,8 @@ def configuration(parent_package='',top_path=None): config.add_subpackage('linalg') config.add_subpackage('random') config.add_subpackage('ma') + config.add_subpackage('doc') + config.add_subpackage('doc/reference') config.add_data_dir('doc') config.add_data_dir('tests') config.make_config_py() # installs __config__.py |