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

Method test_stable_sort

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

Source from the content-addressed store, hash-verified

3529 assert_equal(sortedx, array([-1, 0], dtype=np.int8))
3530
3531 def test_stable_sort(self):
3532 x = array([1, 2, 3, 1, 2, 3], dtype=np.uint8)
3533 expected = array([0, 3, 1, 4, 2, 5])
3534 computed = argsort(x, kind='stable')
3535 assert_equal(computed, expected)
3536
3537 def test_argsort_matches_sort(self):
3538 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