diff options
author | jaimefrio <jaime.frio@gmail.com> | 2014-09-24 23:52:07 -0700 |
---|---|---|
committer | jaimefrio <jaime.frio@gmail.com> | 2014-09-25 18:27:15 -0700 |
commit | ed9345fc89a9375c98f00f1be64c5bab1fa7475d (patch) | |
tree | a5655754d98f887421cf65d83dec31b4757f5a2b /numpy/add_newdocs.py | |
parent | e3e82e50b6340f8784baf28090a81878979e489a (diff) | |
download | numpy-ed9345fc89a9375c98f00f1be64c5bab1fa7475d.tar.gz |
DOC: document improvements to `np.digitize`
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r-- | numpy/add_newdocs.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index fc92a5a7e..1a3f609a3 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -4869,6 +4869,13 @@ add_newdoc('numpy.lib._compiled_base', 'digitize', attempting to index `bins` with the indices that `digitize` returns will result in an IndexError. + .. versionadded:: 1.10.0 + + `np.digitize` is implemented in terms of `np.searchsorted`. This means + that a binary search is used to bin the values, which scales much better + for larger number of bins than the previous linear search. It also removes + the requirement for the input array to be 1-dimensional. + Examples -------- >>> x = np.array([0.2, 6.4, 3.0, 1.6]) |