(self)
| 489 | sliding_window_view(arr, (5, 5)) |
| 490 | |
| 491 | def test_writeable(self): |
| 492 | arr = np.arange(5) |
| 493 | view = sliding_window_view(arr, 2, writeable=False) |
| 494 | assert_(not view.flags.writeable) |
| 495 | with pytest.raises( |
| 496 | ValueError, |
| 497 | match='assignment destination is read-only'): |
| 498 | view[0, 0] = 3 |
| 499 | view = sliding_window_view(arr, 2, writeable=True) |
| 500 | assert_(view.flags.writeable) |
| 501 | view[0, 1] = 3 |
| 502 | assert_array_equal(arr, np.array([0, 3, 2, 3, 4])) |
| 503 | |
| 504 | def test_subok(self): |
| 505 | class MyArray(np.ndarray): |
nothing calls this directly
no test coverage detected