(self)
| 408 | assert_array_equal(arr_view, expected) |
| 409 | |
| 410 | def test_2d(self): |
| 411 | i, j = np.ogrid[:3, :4] |
| 412 | arr = 10*i + j |
| 413 | shape = (2, 2) |
| 414 | arr_view = sliding_window_view(arr, shape) |
| 415 | expected = np.array([[[[0, 1], [10, 11]], |
| 416 | [[1, 2], [11, 12]], |
| 417 | [[2, 3], [12, 13]]], |
| 418 | [[[10, 11], [20, 21]], |
| 419 | [[11, 12], [21, 22]], |
| 420 | [[12, 13], [22, 23]]]]) |
| 421 | assert_array_equal(arr_view, expected) |
| 422 | |
| 423 | def test_2d_with_axis(self): |
| 424 | i, j = np.ogrid[:3, :4] |
nothing calls this directly
no test coverage detected