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

Method test_negbound

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

Source from the content-addressed store, hash-verified

28
29 @pytest.mark.slow
30 def test_negbound(self):
31 xvec = np.arange(12)
32 xlow = -6
33 xhigh = 4
34 # Calculate the upper bound,
35 # Keeping the 1 index in mind
36 def ubound(xl, xh):
37 return xh - xl + 1
38 rval = self.module.foo(is_=xlow, ie_=xhigh,
39 arr=xvec[:ubound(xlow, xhigh)])
40 expval = np.arange(11, dtype = np.float32)
41 assert np.allclose(rval, expval)
42
43
44class TestNumpyVersionAttribute(util.F2PyTest):

Callers

nothing calls this directly

Calls 1

fooMethod · 0.45

Tested by

no test coverage detected