Return an ndarray of indices that sort the array along the specified axis. Masked values are filled beforehand to fill_value.
Parameters : | axis : int, optional
fill_value : var, optional
kind : {‘quicksort’, ‘mergesort’, ‘heapsort’}, optional
order : list, optional
|
---|---|
Returns : | index_array : ndarray, int
|
See also
Notes
See sort for notes on the different sorting algorithms.
Examples
>>> a = np.ma.array([3,2,1], mask=[False, False, True])
>>> a
masked_array(data = [3 2 --],
mask = [False False True],
fill_value = 999999)
>>> a.argsort()
array([1, 0, 2])