diff options
author | Jaime Fernandez <jaime.frio@gmail.com> | 2015-05-30 14:19:07 -0700 |
---|---|---|
committer | Jaime Fernandez <jaime.frio@gmail.com> | 2015-05-30 14:19:07 -0700 |
commit | 5be67675762180503e1b3c4824d2009d3614f181 (patch) | |
tree | b26b2509bbbce1b71eea411b17c0a867b2019915 /numpy/add_newdocs.py | |
parent | a3ffea107820c06a62fd74c4dff1a51bd1ebb284 (diff) | |
download | numpy-5be67675762180503e1b3c4824d2009d3614f181.tar.gz |
DOC: Better document 'order' argument of 'sort' and friends
Closes #5927
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 -------- |