diff --git a/Wrappers/Python/cil/optimisation/functions/Function.py b/Wrappers/Python/cil/optimisation/functions/Function.py index 21d55e20b0..f1a6479cdb 100644 --- a/Wrappers/Python/cil/optimisation/functions/Function.py +++ b/Wrappers/Python/cil/optimisation/functions/Function.py @@ -394,7 +394,7 @@ def __call__(self, x): return super(SubsetSumFunction, self).__call__(x) - def _full_gradient(self, x, out=None): + def full_gradient(self, x, out=None): r""" Computes the full gradient at :code:`x`. It is the sum of all the gradients for each function. """ return super(SubsetSumFunction, self).gradient(x, out=out) diff --git a/Wrappers/Python/test/test_SubsetSumFunction.py b/Wrappers/Python/test/test_SubsetSumFunction.py index 58289f0f7d..bfe659b568 100644 --- a/Wrappers/Python/test/test_SubsetSumFunction.py +++ b/Wrappers/Python/test/test_SubsetSumFunction.py @@ -51,7 +51,7 @@ def test_call_method(self): def test_full_gradient(self): res1 = self.f.gradient(self.x_cil) - res2 = self.f_subset_sum_function._full_gradient(self.x_cil) + res2 = self.f_subset_sum_function.full_gradient(self.x_cil) np.testing.assert_allclose(res1.array, res2.array, atol=1e-3) def test_sampling_sequential(self):