diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-06-01 10:01:20 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-06-01 10:01:20 -0600 |
commit | c8202592bb8d85c22c643d15d07889b9b9e7f09e (patch) | |
tree | 8c6389fc28b7ba91e92d3e8dd0882b1b7115bbbf /numpy/add_newdocs.py | |
parent | d9ab8f76543f120d67d3e33ae667860924d00971 (diff) | |
parent | 5be67675762180503e1b3c4824d2009d3614f181 (diff) | |
download | numpy-c8202592bb8d85c22c643d15d07889b9b9e7f09e.tar.gz |
Merge pull request #5928 from jaimefrio/sort_order_doc
DOC: Better document 'order' argument of 'sort' and friends
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r-- | numpy/add_newdocs.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 55bcf8ee1..b0306957e 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -4191,10 +4191,12 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('sort', last axis. kind : {'quicksort', 'mergesort', 'heapsort'}, optional Sorting algorithm. Default is 'quicksort'. - order : list, optional + order : str or list of str, optional When `a` is an array with fields defined, this argument specifies - which fields to compare first, second, etc. Not all fields need be - specified. + which fields to compare first, second, etc. A single field can + be specified as a string, and not all fields need be specified, + but unspecified fields will still be used, in the order in which + they come up in the dtype, to break ties. See Also -------- @@ -4258,10 +4260,12 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('partition', last axis. kind : {'introselect'}, optional Selection algorithm. Default is 'introselect'. - order : list, optional + order : str or list of str, optional When `a` is an array with fields defined, this argument specifies - which fields to compare first, second, etc. Not all fields need be - specified. + which fields to compare first, second, etc. A single field can + be specified as a string, and not all fields need be specified, + but unspecified fields will still be used, in the order in which + they come up in the dtype, to break ties. See Also -------- |