(self)
| 474 | sliding_window_view(arr, (5, 5)) |
| 475 | |
| 476 | def test_writeable(self): |
| 477 | arr = np.arange(5) |
| 478 | view = sliding_window_view(arr, 2, writeable=False) |
| 479 | assert_(not view.flags.writeable) |
| 480 | with pytest.raises( |
| 481 | ValueError, |
| 482 | match='assignment destination is read-only'): |
| 483 | view[0, 0] = 3 |
| 484 | view = sliding_window_view(arr, 2, writeable=True) |
| 485 | assert_(view.flags.writeable) |
| 486 | view[0, 1] = 3 |
| 487 | assert_array_equal(arr, np.array([0, 3, 2, 3, 4])) |
| 488 | |
| 489 | def test_subok(self): |
| 490 | class MyArray(np.ndarray): |
nothing calls this directly
no test coverage detected