(self)
| 413 | compare_results(res, desired) |
| 414 | |
| 415 | def test_integer_split_2D_rows(self): |
| 416 | a = np.array([np.arange(10), np.arange(10)]) |
| 417 | res = array_split(a, 3, axis=0) |
| 418 | tgt = [np.array([np.arange(10)]), np.array([np.arange(10)]), |
| 419 | np.zeros((0, 10))] |
| 420 | compare_results(res, tgt) |
| 421 | assert_(a.dtype.type is res[-1].dtype.type) |
| 422 | |
| 423 | # Same thing for manual splits: |
| 424 | res = array_split(a, [0, 1], axis=0) |
| 425 | tgt = [np.zeros((0, 10)), np.array([np.arange(10)]), |
| 426 | np.array([np.arange(10)])] |
| 427 | compare_results(res, tgt) |
| 428 | assert_(a.dtype.type is res[-1].dtype.type) |
| 429 | |
| 430 | def test_integer_split_2D_cols(self): |
| 431 | a = np.array([np.arange(10), np.arange(10)]) |
nothing calls this directly
no test coverage detected