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

Method test_basic

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

Source from the content-addressed store, hash-verified

969class TestGradient:
970
971 def test_basic(self):
972 v = [[1, 1], [3, 4]]
973 x = np.array(v)
974 dx = [np.array([[2., 3.], [2., 3.]]),
975 np.array([[0., 0.], [1., 1.]])]
976 assert_array_equal(gradient(x), dx)
977 assert_array_equal(gradient(v), dx)
978
979 def test_args(self):
980 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