I would like an efficient (vectorized) way of manipulating a matrix in julia into a new matrix where all non-zero elements are ones in the new matrix.
For example, I would like this matrix
0 3 6 8 0
7 0 2 0 1
0 4 9 1 0
to become
0 1 1 1 0
1 0 1 0 1
0 1 1 1 0