(self)
| 423 | assert_array_equal(arr_view, expected) |
| 424 | |
| 425 | def test_2d(self): |
| 426 | i, j = np.ogrid[:3, :4] |
| 427 | arr = 10 * i + j |
| 428 | shape = (2, 2) |
| 429 | arr_view = sliding_window_view(arr, shape) |
| 430 | expected = np.array([[[[0, 1], [10, 11]], |
| 431 | [[1, 2], [11, 12]], |
| 432 | [[2, 3], [12, 13]]], |
| 433 | [[[10, 11], [20, 21]], |
| 434 | [[11, 12], [21, 22]], |
| 435 | [[12, 13], [22, 23]]]]) |
| 436 | assert_array_equal(arr_view, expected) |
| 437 | |
| 438 | def test_2d_with_axis(self): |
| 439 | i, j = np.ogrid[:3, :4] |
nothing calls this directly
no test coverage detected