summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorepapoutsellis <epapoutsellis@gmail.com>2019-04-29 16:19:09 +0100
committerepapoutsellis <epapoutsellis@gmail.com>2019-04-29 16:19:09 +0100
commitd89b81276f492d747bdbda71856e11c0453fce23 (patch)
treee09854e8ace05d0c287f1be79ed8ddec0ebb273a /Wrappers
parent4bacf27deec2abe993750ca7e1c873fd7aece8cd (diff)
downloadframework-d89b81276f492d747bdbda71856e11c0453fce23.tar.gz
framework-d89b81276f492d747bdbda71856e11c0453fce23.tar.bz2
framework-d89b81276f492d747bdbda71856e11c0453fce23.tar.xz
framework-d89b81276f492d747bdbda71856e11c0453fce23.zip
fix gradient out
Diffstat (limited to 'Wrappers')
-rwxr-xr-xWrappers/Python/ccpi/optimisation/functions/ScaledFunction.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py b/Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py
index 7caeab2..1db223b 100755
--- a/Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py
@@ -59,7 +59,8 @@ class ScaledFunction(object):
if out is None:
return self.scalar * self.function.gradient(x)
else:
- out.fill( self.scalar * self.function.gradient(x) )
+ self.function.gradient(x, out=out)
+ out *= self.scalar
def proximal(self, x, tau, out=None):
'''This returns the proximal operator for the function at x, tau