Skip to content

Commit 18ef384

Browse files
authored
Apply suggestions from code review
Fix style checks
1 parent 907886f commit 18ef384

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

art/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ def projection_l1_1(values: np.ndarray, eps: Union[int, float, np.ndarray]) -> n
408408
done = early_done = True
409409
break
410410
j -= 1
411-
412411
if not early_done:
413412
delta = (mat[:, 0] + a_sorted[:, 0] - eps) / n
414413
ind_set = np.sign(np.maximum(delta, 0))
@@ -418,9 +417,8 @@ def projection_l1_1(values: np.ndarray, eps: Union[int, float, np.ndarray]) -> n
418417
a_after = a_sorted - delta_vec
419418
proj += act_multiplier * (a_after - proj)
420419
done = True
421-
422420
if not done:
423-
proj = active * (a_sorted - proj)
421+
proj = active * (a_sorted - proj)
424422

425423
for i in range(m):
426424
proj[i, :] = proj[i, a_argsort_inv[i, :]]

0 commit comments

Comments
 (0)