summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
index 597d4d8..889d703 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
@@ -80,7 +80,8 @@ class L2NormSquared(Function):
tmp = 0
if self.b is not None:
- tmp = (self.b * x).sum()
+# tmp = (self.b * x).sum()
+ tmp = (x * self.b).sum()
if out is None:
# FIXME: this is a number
@@ -117,7 +118,8 @@ class L2NormSquared(Function):
if out is None:
if self.b is not None:
- return (x - tau*self.b)/(1 + tau/2)
+ # change the order cannot add ImageData + NestedBlock
+ return (-1* tau*self.b + x)/(1 + tau/2)
else:
return x/(1 + tau/2 )
else: