summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-04-16 07:29:14 -0400
committerEdoardo Pasca <edo.paskino@gmail.com>2019-04-16 07:29:14 -0400
commit982ddc562fb77fd866ab92d4dcc19099c189fad8 (patch)
treeb3cd151a3587f6c457f1a4bf3676c681b6bfcffc /Wrappers/Python
parente61ec15dfd3d5082e2c29194165b48245a6ac8a2 (diff)
downloadframework-982ddc562fb77fd866ab92d4dcc19099c189fad8.tar.gz
framework-982ddc562fb77fd866ab92d4dcc19099c189fad8.tar.bz2
framework-982ddc562fb77fd866ab92d4dcc19099c189fad8.tar.xz
framework-982ddc562fb77fd866ab92d4dcc19099c189fad8.zip
minor change of PowerMethod
Diffstat (limited to 'Wrappers/Python')
-rwxr-xr-xWrappers/Python/ccpi/optimisation/operators/LinearOperator.py5
1 files changed, 3 insertions, 2 deletions
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