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

Method test_argpartition_gh5524

numpy/_core/tests/test_multiarray.py:3710–3715  ·  view source on GitHub ↗
(self, kth_dtype)

Source from the content-addressed store, hash-verified

3708
3709 @pytest.mark.parametrize("kth_dtype", np.typecodes["AllInteger"])
3710 def test_argpartition_gh5524(self, kth_dtype):
3711 # A test for functionality of argpartition on lists.
3712 kth = np.array(1, dtype=kth_dtype)[()]
3713 d = [6, 7, 3, 2, 9, 0]
3714 p = np.argpartition(d, kth)
3715 self.assert_partitioned(np.array(d)[p], [1])
3716
3717 def test_flatten(self):
3718 x0 = np.array([[1, 2, 3], [4, 5, 6]], np.int32)

Callers

nothing calls this directly

Calls 2

assert_partitionedMethod · 0.95
argpartitionMethod · 0.80

Tested by

no test coverage detected