(self, f_dtype)
| 1334 | @pytest.mark.parametrize('f_dtype', [np.int8, np.int16, |
| 1335 | np.int32, np.int64]) |
| 1336 | def test_f_signed_int_big_jump(self, f_dtype): |
| 1337 | maxint = np.iinfo(f_dtype).max |
| 1338 | x = np.array([1, 3]) |
| 1339 | f = np.array([-1, maxint], dtype=f_dtype) |
| 1340 | dfdx = gradient(f, x) |
| 1341 | assert_array_equal(dfdx, [(maxint + 1) // 2] * 2) |
| 1342 | |
| 1343 | @pytest.mark.parametrize('x_dtype', [np.uint8, np.uint16, |
| 1344 | np.uint32, np.uint64]) |
nothing calls this directly
no test coverage detected