(self)
| 384 | compare_results(res, desired) |
| 385 | |
| 386 | def test_integer_split_2D_rows(self): |
| 387 | a = np.array([np.arange(10), np.arange(10)]) |
| 388 | res = array_split(a, 3, axis=0) |
| 389 | tgt = [np.array([np.arange(10)]), np.array([np.arange(10)]), |
| 390 | np.zeros((0, 10))] |
| 391 | compare_results(res, tgt) |
| 392 | assert_(a.dtype.type is res[-1].dtype.type) |
| 393 | |
| 394 | # Same thing for manual splits: |
| 395 | res = array_split(a, [0, 1], axis=0) |
| 396 | tgt = [np.zeros((0, 10)), np.array([np.arange(10)]), |
| 397 | np.array([np.arange(10)])] |
| 398 | compare_results(res, tgt) |
| 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)]) |
nothing calls this directly
no test coverage detected