Quick 'for' and 'if' one-line loop

A generic approach

c .= ifelse.(c .== 0, 1, c)
5 Likes