From 6d1e7e939c598391399562ee93e3ad2a06dc8046 Mon Sep 17 00:00:00 2001 From: Lakshay Garg Date: Sun, 25 Mar 2018 00:18:37 +0530 Subject: add release note --- doc/release/1.15.0-notes.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 ======= -- cgit v1.2.1