Skip to content

Commit

Permalink
_proximal_step_numpy accepts BlockDataContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
paskino committed Oct 10, 2023
1 parent e646fb2 commit 2d2fdac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 1 addition & 4 deletions Wrappers/Python/cil/optimisation/functions/MixedL21Norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ def _proximal_step_numpy(arr, tau):
res.maximum(0.0, out=res)
res.multiply(arr, out=res)
res.divide(tmp, out=res)

# TODO avoid using numpy, add operation in the framework
# This will be useful when we add cupy


for el in res.containers:

elarray = el.as_array()
Expand Down
5 changes: 4 additions & 1 deletion Wrappers/Python/test/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,10 @@ def test_MixedL21Norm_proximal_step_numpy_bdc(self):

sigma1 = 1./tmp_sigma
tmp = ig.allocate(1)
# tau = ig.allocate(2)

# this test only makes sense if the shape of the various containers
# in the bdc is the same.
# Does it make sense to keep this?
a = _proximal_step_numpy(tmp, sigma1)

sigma2 = -1./tmp_sigma
Expand Down

0 comments on commit 2d2fdac

Please sign in to comment.