From 77187d2372898d6c18129aba9d562450a1af3a2c Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 3 Aug 2006 13:19:50 +0000 Subject: Format docstrings to be consistent with others. --- numpy/lib/function_base.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'numpy/lib/function_base.py') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index ec093e00b..557383b71 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -395,7 +395,9 @@ def diff(a, n=1, axis=-1): 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 @@ -405,7 +407,9 @@ add_docstring(digitize, """) 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(bincount, """) 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 -- cgit v1.2.1