MCPcopy
hub / github.com/numpy/numpy / argsort

Function argsort

numpy/ma/core.py:7213–7227  ·  view source on GitHub ↗

Function version of the eponymous method.

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

Source from the content-addressed store, hash-verified

7211
7212
7213def argsort(a, axis=np._NoValue, kind=None, order=None, endwith=True,
7214 fill_value=None, *, stable=None, descending=None):
7215 "Function version of the eponymous method."
7216 a = np.asanyarray(a)
7217
7218 # 2017-04-11, Numpy 1.13.0, gh-8701: warn on axis default
7219 if axis is np._NoValue:
7220 axis = _deprecate_argsort_axis(a)
7221
7222 if isinstance(a, MaskedArray):
7223 return a.argsort(axis=axis, kind=kind, order=order, endwith=endwith,
7224 fill_value=fill_value, stable=stable, descending=descending)
7225 else:
7226 return a.argsort(axis=axis, kind=kind, order=order, stable=stable,
7227 descending=descending)
7228
7229
7230argsort.__doc__ = MaskedArray.argsort.__doc__

Callers 5

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 5

test_stable_sortMethod · 0.72
test_argsortMethod · 0.72
_test_baseMethod · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…