From c251a51022117fe3a104be8e35b084c7de7205fb Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Wed, 2 Jan 2019 16:07:22 -0800 Subject: 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 --- numpy/core/fromnumeric.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'numpy/core/fromnumeric.py') 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]]) -- cgit v1.2.1