MCPcopy Index your code
hub / github.com/numpy/numpy / test_x_decreasing_unsigned

Method test_x_decreasing_unsigned

numpy/lib/tests/test_function_base.py:1345–1349  ·  view source on GitHub ↗
(self, x_dtype)

Source from the content-addressed store, hash-verified

1343 @pytest.mark.parametrize('x_dtype', [np.uint8, np.uint16,
1344 np.uint32, np.uint64])
1345 def test_x_decreasing_unsigned(self, x_dtype):
1346 x = np.array([3, 2, 1], dtype=x_dtype)
1347 f = np.array([0, 2, 4])
1348 dfdx = gradient(f, x)
1349 assert_array_equal(dfdx, [-2] * len(x))
1350
1351 @pytest.mark.parametrize('x_dtype', [np.int8, np.int16,
1352 np.int32, np.int64])

Callers

nothing calls this directly

Calls 2

gradientFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected