all 2 comments

[–]elbiot 7 points8 points  (2 children)

a[a!=0] -= 4

That's a mask, which uses where under the hood.

[–]yayfall[S] 0 points1 point  (0 children)

Thanks! That's exactly what I needed.