summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
authorjaimefrio <jaime.frio@gmail.com>2014-09-22 22:53:12 -0700
committerjaimefrio <jaime.frio@gmail.com>2014-09-25 18:25:46 -0700
commite3e82e50b6340f8784baf28090a81878979e489a (patch)
treea22d509bb0de8e27b941cb26408546f62b9f888f /numpy/add_newdocs.py
parentbefb246c6d011abc1b4b42ecd8b2e3731b81ce04 (diff)
downloadnumpy-e3e82e50b6340f8784baf28090a81878979e489a.tar.gz
ENH: implement `digitize` with `PyArray_SearchSorted`
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 0a48f1ade..fc92a5a7e 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -4837,14 +4837,14 @@ add_newdoc('numpy.lib._compiled_base', 'digitize',
Parameters
----------
x : array_like
- Input array to be binned. It has to be 1-dimensional.
+ Input array to be binned.
bins : array_like
Array of bins. It has to be 1-dimensional and monotonic.
right : bool, optional
Indicating whether the intervals include the right or the left bin
edge. Default behavior is (right==False) indicating that the interval
- does not include the right edge. The left bin and is open in this
- case. Ie., bins[i-1] <= x < bins[i] is the default behavior for
+ does not include the right edge. The left bin end is open in this
+ case, i.e., bins[i-1] <= x < bins[i] is the default behavior for
monotonically increasing bins.
Returns
@@ -4855,7 +4855,7 @@ add_newdoc('numpy.lib._compiled_base', 'digitize',
Raises
------
ValueError
- If the input is not 1-dimensional, or if `bins` is not monotonic.
+ If `bins` is not monotonic.
TypeError
If the type of the input is complex.
@@ -4885,7 +4885,7 @@ add_newdoc('numpy.lib._compiled_base', 'digitize',
1.0 <= 1.6 < 2.5
>>> x = np.array([1.2, 10.0, 12.4, 15.5, 20.])
- >>> bins = np.array([0,5,10,15,20])
+ >>> bins = np.array([0, 5, 10, 15, 20])
>>> np.digitize(x,bins,right=True)
array([1, 2, 3, 4, 4])
>>> np.digitize(x,bins,right=False)