()
| 122 | |
| 123 | |
| 124 | def test_getitem(): |
| 125 | x = np.random.rand(1_000_000) |
| 126 | y = getitem(x, slice(120, 122)) |
| 127 | |
| 128 | assert y.flags.owndata |
| 129 | assert not getitem(x, slice(1, None)).flags.owndata |
| 130 | |
| 131 | y_op = operator.getitem(x, slice(120, 122)) |
| 132 | assert not y_op.flags.owndata |
| 133 | assert not operator.getitem(x, slice(1, None)).flags.owndata |