(self)
| 1110 | class 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)) |
nothing calls this directly
no test coverage detected