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

Method test_empty_partition

numpy/core/tests/test_item_selection.py:72–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 assert_raises(ValueError, d.take, 5, mode=k)
71
72 def test_empty_partition(self):
73 # In reference to github issue #6530
74 a_original = np.array([0, 2, 4, 6, 8, 10])
75 a = a_original.copy()
76
77 # An empty partition should be a successful no-op
78 a.partition(np.array([], dtype=np.int16))
79
80 assert_array_equal(a, a_original)
81
82 def test_empty_argpartition(self):
83 # In reference to github issue #6530

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
copyMethod · 0.45
partitionMethod · 0.45

Tested by

no test coverage detected