()
| 23 | |
| 24 | |
| 25 | def test_reshape_copy(): |
| 26 | a = asarray(np.ones((2, 3))) |
| 27 | b = reshape(a, (3, 2), copy=True) |
| 28 | assert not np.shares_memory(a._array, b._array) |
| 29 | |
| 30 | a = asarray(np.ones((2, 3))) |
| 31 | b = reshape(a, (3, 2), copy=False) |
| 32 | assert np.shares_memory(a._array, b._array) |
| 33 | |
| 34 | a = asarray(np.ones((2, 3)).T) |
| 35 | b = reshape(a, (3, 2), copy=True) |
| 36 | assert_raises(AttributeError, lambda: reshape(a, (2, 3), copy=False)) |
| 37 |
nothing calls this directly
no test coverage detected