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

Method test_integer_split_2D_cols

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

Source from the content-addressed store, hash-verified

399 assert_(a.dtype.type is res[-1].dtype.type)
400
401 def test_integer_split_2D_cols(self):
402 a = np.array([np.arange(10), np.arange(10)])
403 res = array_split(a, 3, axis=-1)
404 desired = [np.array([np.arange(4), np.arange(4)]),
405 np.array([np.arange(4, 7), np.arange(4, 7)]),
406 np.array([np.arange(7, 10), np.arange(7, 10)])]
407 compare_results(res, desired)
408
409 def test_integer_split_2D_default(self):
410 """ This will fail if we change default axis

Callers

nothing calls this directly

Calls 2

array_splitFunction · 0.90
compare_resultsFunction · 0.85

Tested by

no test coverage detected