diff --git a/skglm/penalties/separable.py b/skglm/penalties/separable.py index ee45eca88..c7d8d0bd7 100644 --- a/skglm/penalties/separable.py +++ b/skglm/penalties/separable.py @@ -527,6 +527,12 @@ def prox_1d(self, value, stepsize, j): """Compute the proximal operator of L0_5.""" return prox_05(value, self.alpha * stepsize) + def prox_vec(self, x, stepsize): + res = np.zeros_like(x) + for j in range(x.shape[0]): + res[j] = self.prox_1d(x[j], stepsize, j) + return res + def subdiff_distance(self, w, grad, ws): """Compute distance of negative gradient to the subdifferential at w.""" subdiff_dist = np.zeros_like(grad)