From: Bjørn Rustad Date: Fri, 30 Sep 2011 13:20:11 +0000 (+0200) Subject: Fix error in gradient X-Git-Url: http://git.rustad.me/?a=commitdiff_plain;h=ee61b0e46a8b1ad94cf39b8de27fe4da41c3af30;p=nummat1 Fix error in gradient --- diff --git a/bj_function.py b/bj_function.py index 6eb99fd..34c6e41 100644 --- a/bj_function.py +++ b/bj_function.py @@ -4,7 +4,7 @@ def function_g(x, H, b, c): # Calculate gradient of g in point x def gradient_g(x, H, b, c): - return -b.T + H.dot(x) + (1.0/3.0) * x.T.dot(_C(x,c)) + return -b + H.dot(x) + (1.0/3.0) * _C(x,c).dot(x) # Calculate hessian of g in point x def hessian_g(x, H, b, c):