(self)
| 12 | |
| 13 | @pytest.mark.slow |
| 14 | def test_inout(self): |
| 15 | # non-contiguous should raise error |
| 16 | x = np.arange(6, dtype=np.float32)[::2] |
| 17 | pytest.raises(ValueError, self.module.foo, x) |
| 18 | |
| 19 | # check values with contiguous array |
| 20 | x = np.arange(3, dtype=np.float32) |
| 21 | self.module.foo(x) |
| 22 | assert np.allclose(x, [3, 1, 2]) |
| 23 | |
| 24 | |
| 25 | class TestNegativeBounds(util.F2PyTest): |