1. 程式人生 > >numpy中argsort函式用法

numpy中argsort函式用法

>>> import numpy
>>> help(numpy.argsort)
Help on function argsort in module numpy.core.fromnumeric:


argsort(a, axis=-1, kind='quicksort', order=None)
    Returns the indices that would sort an array.
    
    Perform an indirect sort along the given axis using the algorithm specified
    by the `kind` keyword. It returns an array of indices of the same shape as
    `a` that index data along the given axis in sorted order.