diff options
author | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-29 16:19:09 +0100 |
---|---|---|
committer | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-29 16:19:09 +0100 |
commit | d89b81276f492d747bdbda71856e11c0453fce23 (patch) | |
tree | e09854e8ace05d0c287f1be79ed8ddec0ebb273a /Wrappers | |
parent | 4bacf27deec2abe993750ca7e1c873fd7aece8cd (diff) | |
download | framework-d89b81276f492d747bdbda71856e11c0453fce23.tar.gz framework-d89b81276f492d747bdbda71856e11c0453fce23.tar.bz2 framework-d89b81276f492d747bdbda71856e11c0453fce23.tar.xz framework-d89b81276f492d747bdbda71856e11c0453fce23.zip |
fix gradient out
Diffstat (limited to 'Wrappers')
-rwxr-xr-x | Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py | 3 |
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
|