diff options
author | Lakshay Garg <lakshayg@outlook.in> | 2018-03-25 00:18:37 +0530 |
---|---|---|
committer | Lakshay Garg <lakshayg@outlook.in> | 2018-03-25 00:18:37 +0530 |
commit | 6d1e7e939c598391399562ee93e3ad2a06dc8046 (patch) | |
tree | e1f6af1cc0dd34de06b2d7d4b89b12630ee18dca | |
parent | 864a431fd6047b1c26a7001bd2e3d989a5320e0f (diff) | |
download | numpy-6d1e7e939c598391399562ee93e3ad2a06dc8046.tar.gz |
add release note
-rw-r--r-- | doc/release/1.15.0-notes.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/release/1.15.0-notes.rst b/doc/release/1.15.0-notes.rst index fadce7684..caeb2e787 100644 --- a/doc/release/1.15.0-notes.rst +++ b/doc/release/1.15.0-notes.rst @@ -156,5 +156,19 @@ This change makes it easier to write Python 2/3 compatible code using ``from __future__ import unicode_literals``, which previously would cause string literal field names to raise a TypeError in Python 2. +``sort`` functions accept ``kind='stable'`` +------------------------------------------- +Up until now, to perform a stable sort on the data, the user must do:: + + >>> np.sort([5, 2, 6, 2, 1], kind='mergesort') + [1, 2, 2, 5, 6] + +because merge sort is the only stable sorting algorithm available in +NumPy. However, having kind='mergesort' does not make it explicit that +the user wants to perform a stable sort thus harming the readability. + +This change allows the user to specify kind='stable' thus clarifying +the intent. + Changes ======= |