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

Method test_basic

numpy/lib/tests/test_function_base.py:1112–1118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1110class TestGradient:
1111
1112 def test_basic(self):
1113 v = [[1, 1], [3, 4]]
1114 x = np.array(v)
1115 dx = [np.array([[2., 3.], [2., 3.]]),
1116 np.array([[0., 0.], [1., 1.]])]
1117 assert_array_equal(gradient(x), dx)
1118 assert_array_equal(gradient(v), dx)
1119
1120 def test_args(self):
1121 dx = np.cumsum(np.ones(5))

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
gradientFunction · 0.90

Tested by

no test coverage detected