From 982ddc562fb77fd866ab92d4dcc19099c189fad8 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 16 Apr 2019 07:29:14 -0400 Subject: minor change of PowerMethod --- Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Wrappers/Python') diff --git a/Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py b/Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py index 8ecefb8..bc18f9b 100755 --- a/Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py +++ b/Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py @@ -44,8 +44,9 @@ class LinearOperator(Operator): #s[it] = (x1*x0).sum() / (x0.squared_norm()) s[it] = x1.dot(x0) / x0.squared_norm() #x0 = (1.0/x1norm)*x1 - x1 *= (1.0 / x1norm) - x0.fill(x1) + #x1 *= (1.0 / x1norm) + #x0.fill(x1) + x1.multiply((1.0/x1norm), out=x0) return numpy.sqrt(s[-1]), numpy.sqrt(s), x0 @staticmethod -- cgit v1.2.3