[Numpy-svn] r5371 - in trunk/numpy: . doc doc/reference

numpy-svn@scip... numpy-svn@scip...
Wed Jul 9 03:13:59 CDT 2008


Author: stefan
Date: 2008-07-09 03:13:18 -0500 (Wed, 09 Jul 2008)
New Revision: 5371

Added:
   trunk/numpy/doc/__init__.py
   trunk/numpy/doc/reference/
   trunk/numpy/doc/reference/__init__.py
   trunk/numpy/doc/reference/broadcasting.py
   trunk/numpy/doc/reference/indexing.py
Modified:
   trunk/numpy/__init__.py
   trunk/numpy/setup.py
Log:
Add numpy.doc topical documentation framework.


Modified: trunk/numpy/__init__.py
===================================================================
--- trunk/numpy/__init__.py	2008-07-09 06:30:24 UTC (rev 5370)
+++ trunk/numpy/__init__.py	2008-07-09 08:13:18 UTC (rev 5371)
@@ -108,6 +108,7 @@
     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 @@
                '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'])
 

Added: trunk/numpy/doc/__init__.py
===================================================================
--- trunk/numpy/doc/__init__.py	2008-07-09 06:30:24 UTC (rev 5370)
+++ trunk/numpy/doc/__init__.py	2008-07-09 08:13:18 UTC (rev 5371)
@@ -0,0 +1,2 @@
+from numpy.doc.reference import *
+del reference

Added: trunk/numpy/doc/reference/__init__.py
===================================================================
--- trunk/numpy/doc/reference/__init__.py	2008-07-09 06:30:24 UTC (rev 5370)
+++ trunk/numpy/doc/reference/__init__.py	2008-07-09 08:13:18 UTC (rev 5371)
@@ -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__'])

Added: trunk/numpy/doc/reference/broadcasting.py
===================================================================
--- trunk/numpy/doc/reference/broadcasting.py	2008-07-09 06:30:24 UTC (rev 5370)
+++ trunk/numpy/doc/reference/broadcasting.py	2008-07-09 08:13:18 UTC (rev 5371)
@@ -0,0 +1,9 @@
+"""
+
+========================
+Broadcasting over arrays
+========================
+
+Placeholder for broadcasting documentation.
+
+"""

Added: trunk/numpy/doc/reference/indexing.py
===================================================================
--- trunk/numpy/doc/reference/indexing.py	2008-07-09 06:30:24 UTC (rev 5370)
+++ trunk/numpy/doc/reference/indexing.py	2008-07-09 08:13:18 UTC (rev 5371)
@@ -0,0 +1,9 @@
+"""
+
+==============
+Array indexing
+==============
+
+Placeholder for array indexing documentation.
+
+"""

Modified: trunk/numpy/setup.py
===================================================================
--- trunk/numpy/setup.py	2008-07-09 06:30:24 UTC (rev 5370)
+++ trunk/numpy/setup.py	2008-07-09 08:13:18 UTC (rev 5371)
@@ -14,6 +14,8 @@
     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



More information about the Numpy-svn mailing list