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

Method test_index_split_simple

numpy/lib/tests/test_shape_base.py:458–464  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

456 assert_equal(res[i].shape, tgt[i].shape)
457
458 def test_index_split_simple(self):
459 a = np.arange(10)
460 indices = [1, 5, 7]
461 res = array_split(a, indices, axis=-1)
462 desired = [np.arange(0, 1), np.arange(1, 5), np.arange(5, 7),
463 np.arange(7, 10)]
464 compare_results(res, desired)
465
466 def test_index_split_low_bound(self):
467 a = np.arange(10)

Callers

nothing calls this directly

Calls 2

array_splitFunction · 0.90
compare_resultsFunction · 0.85

Tested by

no test coverage detected