summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-07-25 14:32:32 -0500
committerGitHub <noreply@github.com>2016-07-25 14:32:32 -0500
commit1b16cd8762ef2bc046613f99bc4f1556697ed274 (patch)
tree12daecdb9edf4e5f0f6047ba47c11cd50b27d571 /numpy/core/fromnumeric.py
parent93240e0d8ea23644a5b7874037e658c54966ff54 (diff)
parentc3cea4558bb37ba1e6a7a045c108081a88a88691 (diff)
downloadnumpy-1b16cd8762ef2bc046613f99bc4f1556697ed274.tar.gz
Merge pull request #7863 from juliantaylor/introsort
ENH: turn quicksort into introsort
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 7e02ff2c2..d07c5c08b 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -776,6 +776,12 @@ def sort(a, axis=-1, kind='quicksort', order=None):
placements are sorted according to the non-nan part if it exists.
Non-nan values are sorted as before.
+ .. versionadded:: 1.12.0
+
+ quicksort has been changed to an introsort which will switch
+ heapsort when it does not make enough progress. This makes its
+ worst case O(n*log(n)).
+
Examples
--------
>>> a = np.array([[1,4],[3,1]])