summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
index 2ac11ee..1946d67 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
@@ -89,10 +89,25 @@ class L2NormSquared(Function):
'''
if out is None:
- if self.b is not None:
- return (x - self.b)/(1+2*tau) + self.b
- else:
+
+ if self.b is None:
return x/(1+2*tau)
+ else:
+ tmp = x
+ tmp -= self.b
+ tmp /= (1+2*tau)
+ tmp += self.b
+ return tmp
+# return (x-self.b)/(1+2*tau) + self.b
+
+# if self.b is not None:
+# out=x
+# if self.b is not None:
+# out -= self.b
+# out /= (1+2*tau)
+# if self.b is not None:
+# out += self.b
+# return out
else:
out.fill(x)
if self.b is not None: