MCPcopy Create free account
hub / github.com/numpy/numpy / argsort

Function argsort

numpy/ma/core.py:7001–7013  ·  view source on GitHub ↗

Function version of the eponymous method.

(a, axis=np._NoValue, kind=None, order=None, endwith=True, fill_value=None)

Source from the content-addressed store, hash-verified

6999argmax = _frommethod('argmax')
7000
7001def argsort(a, axis=np._NoValue, kind=None, order=None, endwith=True, fill_value=None):
7002 "Function version of the eponymous method."
7003 a = np.asanyarray(a)
7004
7005 # 2017-04-11, Numpy 1.13.0, gh-8701: warn on axis default
7006 if axis is np._NoValue:
7007 axis = _deprecate_argsort_axis(a)
7008
7009 if isinstance(a, MaskedArray):
7010 return a.argsort(axis=axis, kind=kind, order=order,
7011 endwith=endwith, fill_value=fill_value)
7012 else:
7013 return a.argsort(axis=axis, kind=kind, order=order)
7014argsort.__doc__ = MaskedArray.argsort.__doc__
7015
7016def sort(a, axis=-1, kind=None, order=None, endwith=True, fill_value=None):

Callers 5

svdFunction · 0.90
test_stable_sortMethod · 0.90
test_argsortMethod · 0.90
_test_baseMethod · 0.50

Calls 2

_deprecate_argsort_axisFunction · 0.85
argsortMethod · 0.45

Tested by 4

test_stable_sortMethod · 0.72
test_argsortMethod · 0.72
_test_baseMethod · 0.40