(self)
| 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 | |
| 44 | class TestNumpyVersionAttribute(util.F2PyTest): |