summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-04-10 17:36:25 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2019-04-10 17:36:25 +0100
commitd1cd883ce417ae08cfc7f853377f3e17fa55be01 (patch)
tree5310d6daa71fba021a62381ace95bd3c60ea8476 /Wrappers
parent584df30253cc36920f17f6b0bc438c978c3d8462 (diff)
downloadframework-d1cd883ce417ae08cfc7f853377f3e17fa55be01.tar.gz
framework-d1cd883ce417ae08cfc7f853377f3e17fa55be01.tar.bz2
framework-d1cd883ce417ae08cfc7f853377f3e17fa55be01.tar.xz
framework-d1cd883ce417ae08cfc7f853377f3e17fa55be01.zip
set output image to 0
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py b/Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py
index 3d2a96b..db9f09d 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py
@@ -54,7 +54,9 @@ class FiniteDiff(LinearOperator):
out = np.zeros_like(x_asarr)
fd_arr = out
else:
- fd_arr = out.as_array()
+ fd_arr = out.as_array()
+ # set the array to 0
+ fd_arr[:] = 0
# if out is None:
# out = self.gm_domain.allocate().as_array()
@@ -70,7 +72,7 @@ class FiniteDiff(LinearOperator):
np.subtract( x_asarr[:,1:], x_asarr[:,0:-1], out = fd_arr[:,0:-1] )
if self.bnd_cond == 'Neumann':
- pass
+ pass
elif self.bnd_cond == 'Periodic':
np.subtract( x_asarr[:,0], x_asarr[:,-1], out = fd_arr[:,-1] )
else: