[Numpy-svn] r3123 - trunk/numpy

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Sep 5 22:19:34 CDT 2006


Author: charris
Date: 2006-09-05 22:19:32 -0500 (Tue, 05 Sep 2006)
New Revision: 3123

Modified:
   trunk/numpy/add_newdocs.py
Log:
Break up more of the documentation in add_newdocs

Modified: trunk/numpy/add_newdocs.py
===================================================================
--- trunk/numpy/add_newdocs.py	2006-09-05 18:36:49 UTC (rev 3122)
+++ trunk/numpy/add_newdocs.py	2006-09-06 03:19:32 UTC (rev 3123)
@@ -35,27 +35,98 @@
             ]
            )
 
-add_newdoc('numpy.core', 'flatiter',
-           [('__array__',
-"""__array__(type=None)
-Get array from iterator"""),
-            ('copy',
-"""copy()
-Get a copy of the iterator as a 1-d array"""),
-            ('coords', "An N-d tuple of current coordinates.")
-            ]
-           )
+###############################################################################
+#
+# flatiter
+#
+# flatiter needs a toplevel description
+#
+###############################################################################
 
-add_newdoc('numpy.core', 'broadcast',
-           [('size', "total size of broadcasted result"),
-            ('index', "current index in broadcasted result"),
-            ('shape', "shape of broadcasted result"),
-            ('iters', "tuple of individual iterators"),
-            ('numiter', "number of iterators"),
-            ('nd', "number of dimensions of broadcasted result")
-            ]
-           )
+# attributes
+add_newdoc('numpy.core', 'flatiter', ('base',
+    """documentation needed
 
+    """))
+
+
+
+add_newdoc('numpy.core', 'flatiter', ('coords',
+    """An N-d tuple of current coordinates.
+
+    """))
+
+
+
+add_newdoc('numpy.core', 'flatiter', ('index',
+    """documentation needed
+
+    """))
+
+
+
+# functions
+add_newdoc('numpy.core', 'flatiter', ('__array__',
+    """__array__(type=None) Get array from iterator
+
+    """))
+
+
+add_newdoc('numpy.core', 'flatiter', ('copy',
+    """copy() Get a copy of the iterator as a 1-d array
+
+    """))
+
+
+###############################################################################
+#
+# broadcast
+#
+###############################################################################
+
+# attributes
+add_newdoc('numpy.core', 'broadcast', ('index',
+    """current index in broadcasted result
+
+    """))
+
+
+add_newdoc('numpy.core', 'broadcast', ('iters',
+    """tuple of individual iterators
+
+    """))
+
+
+add_newdoc('numpy.core', 'broadcast', ('nd',
+    """number of dimensions of broadcasted result
+
+    """))
+
+
+add_newdoc('numpy.core', 'broadcast', ('numiter',
+    """number of iterators
+
+    """))
+
+
+add_newdoc('numpy.core', 'broadcast', ('shape',
+    """shape of broadcasted result
+
+    """))
+
+
+add_newdoc('numpy.core', 'broadcast', ('size',
+    """total size of broadcasted result
+
+    """))
+
+
+###############################################################################
+#
+# numpy functions
+#
+###############################################################################
+
 add_newdoc('numpy.core.multiarray','array',
     """array(object, dtype=None, copy=1,order=None, subok=0,ndmin=0)
 
@@ -325,12 +396,6 @@
 #
 # Documentation for ndarray attributes and methods
 #
-# Todo:
-#
-# expand and reformat documentation.
-#
-# do all methods prior to Extended methods added 2005
-#
 ##############################################################################
 
 
@@ -1019,6 +1084,8 @@
       ---------------------------------------------------
       bool, int8, int16, int32        int32
 
+    Warning: The arithmetic is modular and no error is raised on overflow.
+
     Examples:
 
     >>> array([0.5, 1.5]).sum()
@@ -1029,6 +1096,8 @@
     array([0, 6])
     >>> array([[0, 1], [0, 5]]).sum(axis=1)
     array([1, 5])
+    >>> ones(128, dtype=int8).sum(dtype=int8) # overflow!
+    -128
 
     """))
 



More information about the Numpy-svn mailing list