summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-12-02 00:35:09 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-12-02 00:35:09 +0000
commit574fe369112ded91f80502db73022a8fd79d3fe3 (patch)
tree904b1b27f758c7e5d6c2790a8f5066300f5b5a15 /numpy/add_newdocs.py
parent5898c2c445cb7fe14e2866b34f625e6f95bbf82f (diff)
downloadnumpy-574fe369112ded91f80502db73022a8fd79d3fe3.tar.gz
Add order keyword to argsort and fix documentation of sort and argsort. Also, fix so that a Python long is passed to mmap instead of an array scalar. Fix setting when using mixed array indices and slice objects by making sure to swap the object in the reverse direction to the swapping that takes place on the MapGet operations.
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py28
1 files changed, 20 insertions, 8 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 9cd1c89a5..58940f007 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -648,13 +648,19 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('argmin',
add_newdoc('numpy.core.multiarray', 'ndarray', ('argsort',
- """a.argsort(axis=-1, kind='quicksort') -> indices that sort a along axis.
+ """a.argsort(axis=-1, kind='quicksort', order=None) -> indices
+
+ Return array of indices that sort a along the given axis.
Keyword arguments:
- axis -- axis to be indirectly sorted (default -1)
- kind -- sorting algorithm (default 'quicksort')
- Possible values: 'quicksort', 'mergesort', or 'heapsort'
+ axis -- axis to be indirectly sorted (default -1)
+ kind -- sorting algorithm (default 'quicksort')
+ Possible values: 'quicksort', 'mergesort', or 'heapsort'
+ order -- If a has fields defined, then the order keyword can be the
+ field name to sort on or a list (or tuple) of field names
+ to indicate the order that fields should be used to define
+ the sort.
Returns: array of indices that sort a along the specified axis.
@@ -1017,13 +1023,19 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('setflags',
add_newdoc('numpy.core.multiarray', 'ndarray', ('sort',
- """a.sort(axis=-1, kind='quicksort') -> None. Sort a along the given axis.
+ """a.sort(axis=-1, kind='quicksort', order=None) -> None.
+
+ Sort a along the given axis.
Keyword arguments:
- axis -- axis to be sorted (default -1)
- kind -- sorting algorithm (default 'quicksort')
- Possible values: 'quicksort', 'mergesort', or 'heapsort'.
+ axis -- axis to be sorted (default -1)
+ kind -- sorting algorithm (default 'quicksort')
+ Possible values: 'quicksort', 'mergesort', or 'heapsort'.
+ order -- If a has fields defined, then the order keyword can be the
+ field name to sort on or a list (or tuple) of field names
+ to indicate the order that fields should be used to define
+ the sort.
Returns: None.