diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2019-04-16 07:29:14 -0400 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2019-04-16 07:29:14 -0400 |
commit | 982ddc562fb77fd866ab92d4dcc19099c189fad8 (patch) | |
tree | b3cd151a3587f6c457f1a4bf3676c681b6bfcffc /Wrappers/Python | |
parent | e61ec15dfd3d5082e2c29194165b48245a6ac8a2 (diff) | |
download | framework-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-x | Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py | 5 |
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
|