MCPcopy Index your code
hub / github.com/numpy/numpy / test_stable_sort

Method test_stable_sort

numpy/ma/tests/test_core.py:3745–3749  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3743 assert_equal(sortedx, array([-1, 0], dtype=np.int8))
3744
3745 def test_stable_sort(self):
3746 x = array([1, 2, 3, 1, 2, 3], dtype=np.uint8)
3747 expected = array([0, 3, 1, 4, 2, 5])
3748 computed = argsort(x, kind='stable')
3749 assert_equal(computed, expected)
3750
3751 def test_argsort_matches_sort(self):
3752 x = array([1, 4, 2, 3], mask=[0, 1, 0, 0], dtype=np.uint8)

Callers

nothing calls this directly

Calls 3

arrayFunction · 0.90
argsortFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected