[Numpy-svn] r2947 - trunk/numpy/lib

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Aug 3 09:19:56 EDT 2006


Author: stefan
Date: 2006-08-03 08:19:50 -0500 (Thu, 03 Aug 2006)
New Revision: 2947

Modified:
   trunk/numpy/lib/function_base.py
Log:
Format docstrings to be consistent with others.


Modified: trunk/numpy/lib/function_base.py
===================================================================
--- trunk/numpy/lib/function_base.py	2006-08-03 02:42:25 UTC (rev 2946)
+++ trunk/numpy/lib/function_base.py	2006-08-03 13:19:50 UTC (rev 2947)
@@ -395,8 +395,10 @@
         return a[slice1]-a[slice2]
 
 add_docstring(digitize, 
-   r"""(x,bins) --> index of the bin to which each value of x belongs.
+   r"""digitize(x,bins)
    
+    Return the index of the bin to which each value of x belongs.
+   
     Each index i returned is such that bins[i-1] <= x < bins[i] if
     bins is monotonically increasing, or bins [i-1] > x >= bins[i] if
     bins is monotonically decreasing.
@@ -405,7 +407,9 @@
     """)
 
 add_docstring(bincount,
-   r"""(x,weights=None) --> the number of occurrences of each value in x.
+   r"""bincount(x,weights=None)
+   
+    Return the number of occurrences of each value in x.
 
     x must be a list of non-negative integers.  The output, b[i],
     represents the number of times that i is found in x.  If weights
@@ -416,7 +420,7 @@
     """)
 
 add_docstring(add_docstring,
-   r"""(obj, docstring) --> None
+   r"""docstring(obj, docstring)
 
    Add a docstring to a built-in obj if possible.
    If the obj already has a docstring raise a RuntimeError




More information about the Numpy-svn mailing list