Skip to content

Commit c56ecd8

Browse files
author
Benjamin Chrétien
committed
tests: fix gradient in function.py.
1 parent 6e5f442 commit c56ecd8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def impl_compute (self, result, x):
1515
result[0] = x[0] * x[0]
1616

1717
def impl_gradient (self, result, x):
18-
result[0] = 2.
18+
result[0] = 2. * x[0]
1919

2020

2121
class TestFunctionPy(unittest.TestCase):

0 commit comments

Comments
 (0)