From ed9345fc89a9375c98f00f1be64c5bab1fa7475d Mon Sep 17 00:00:00 2001 From: jaimefrio Date: Wed, 24 Sep 2014 23:52:07 -0700 Subject: DOC: document improvements to `np.digitize` --- numpy/add_newdocs.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'numpy/add_newdocs.py') 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]) -- cgit v1.2.1