diff options
author | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-23 09:40:40 +0100 |
---|---|---|
committer | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-23 09:40:40 +0100 |
commit | e81478d344f48a9eed344c70a356492257a8c9a8 (patch) | |
tree | a5ecf36dc3fa414ca9d7a5cf3a5e602cb9d3204d /Wrappers/Python | |
parent | c789b7fcb83d5c693194b46fc7347503f34ac359 (diff) | |
download | framework-e81478d344f48a9eed344c70a356492257a8c9a8.tar.gz framework-e81478d344f48a9eed344c70a356492257a8c9a8.tar.bz2 framework-e81478d344f48a9eed344c70a356492257a8c9a8.tar.xz framework-e81478d344f48a9eed344c70a356492257a8c9a8.zip |
fix prox conj
Diffstat (limited to 'Wrappers/Python')
-rw-r--r-- | Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py b/Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py index cce519a..a019815 100644 --- a/Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py +++ b/Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py @@ -39,14 +39,8 @@ class ZeroFunction(Function): indicator function for the set = {0} So 0 if x=0, or inf if x neq 0 ''' + return x.maximum(0).sum() - if x.shape[0]==1: - return x.maximum(0).sum() - else: - if isinstance(x, BlockDataContainer): - return x.get_item(0).maximum(0).sum() + x.get_item(1).maximum(0).sum() - else: - return x.maximum(0).sum() + x.maximum(0).sum() def proximal(self, x, tau, out=None): if out is None: |