summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorTyler Reddy <tyler.je.reddy@gmail.com>2019-01-02 16:07:22 -0800
committermattip <matti.picus@gmail.com>2019-11-22 11:31:25 -0800
commitc251a51022117fe3a104be8e35b084c7de7205fb (patch)
treedd92da024fd34c626a70e49dd09e1ae8689921ad /numpy/core/fromnumeric.py
parent2c14c5b9b2e3153dc3b0026cc8e8e695a2917fee (diff)
downloadnumpy-c251a51022117fe3a104be8e35b084c7de7205fb.tar.gz
BUG: NaT now sorts to end of arrays
* added unit tests for NaT sorting to the ends of arrays * NaT now treated as largest integer for sorting purposes, so that it sorts to end of arrays for consistency with NaN
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 6e5f3dabf..d454480a8 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -944,6 +944,10 @@ def sort(a, axis=-1, kind=None, order=None):
'mergesort' and 'stable' are mapped to radix sort for integer data types. Radix sort is an
O(n) sort instead of O(n log n).
+ .. versionchanged:: 1.17.0
+
+ NaT now sorts to the end of arrays for consistency with NaN.
+
Examples
--------
>>> a = np.array([[1,4],[3,1]])