MCPcopy Create free account
hub / github.com/numpy/numpy / test_inout

Method test_inout

numpy/f2py/tests/test_regression.py:14–22  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
25class TestNegativeBounds(util.F2PyTest):

Callers

nothing calls this directly

Calls 1

fooMethod · 0.45

Tested by

no test coverage detected