diff options
author | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-23 09:41:19 +0100 |
---|---|---|
committer | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-23 09:41:19 +0100 |
commit | 6e5acc587ad08d1c6fe3de1c259f505e51b4c90f (patch) | |
tree | 78de7b7eb3280d0fb124e210c4daf0d0176cf270 | |
parent | e81478d344f48a9eed344c70a356492257a8c9a8 (diff) | |
download | framework-6e5acc587ad08d1c6fe3de1c259f505e51b4c90f.tar.gz framework-6e5acc587ad08d1c6fe3de1c259f505e51b4c90f.tar.bz2 framework-6e5acc587ad08d1c6fe3de1c259f505e51b4c90f.tar.xz framework-6e5acc587ad08d1c6fe3de1c259f505e51b4c90f.zip |
fix __init__
-rw-r--r-- | Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py b/Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py index d5fd8ae..8168f0b 100644 --- a/Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py +++ b/Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py @@ -13,25 +13,26 @@ from ccpi.optimisation.operators import LinearOperator class ZeroOperator(LinearOperator): def __init__(self, gm_domain, gm_range=None): + + super(ZeroOperator, self).__init__() self.gm_domain = gm_domain self.gm_range = gm_range if self.gm_range is None: self.gm_range = self.gm_domain - - super(ZeroOperator, self).__init__() + def direct(self,x,out=None): if out is None: return self.gm_range.allocate() else: - return self.gm_range.allocate() + out.fill(self.gm_range.allocate()) def adjoint(self,x, out=None): if out is None: return self.gm_domain.allocate() else: - return self.gm_domain.allocate() + out.fill(self.gm_domain.allocate()) def norm(self): return 0 |