Skip to content

Commit c259543

Browse files
committed
bug: fix signature of FirstDerivative in TV
1 parent 7a2afe7 commit c259543

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pyproximal/proximal/TV.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,12 @@ def __init__(self, dims, sigma=1., niter=10, rtol=1e-4, **kwargs):
4848
def __call__(self, x):
4949
x = x.reshape(self.dims)
5050
if self.ndim == 1:
51-
derivOp = FirstDerivative(self.dims[0], dims=None, dir=0, edge=False,
51+
derivOp = FirstDerivative(dims=self.dims[0], axis=0, edge=False,
5252
dtype=x.dtype, kind="forward")
5353
dx = derivOp @ x
5454
y = np.sum(np.abs(dx), axis=0)
5555
elif self.ndim >= 2:
5656
y = 0
57-
grads = []
5857
gradOp = Gradient(self.dims, edge=False, dtype=x.dtype, kind="forward")
5958
grads = gradOp.matvec(x.ravel())
6059
grads = grads.reshape((self.ndim, ) + self.dims)

0 commit comments

Comments
 (0)