What would be the best way to to set all non-zero elements of an array to 1 in core matrix?
For 1 dimensional arrays I figured this is a possibility, but I don't know if this is the best way to go:
(m/set-selection doc (m/non-zero-indices doc) 1.0)
For multi-dimensional arrays I could loop over all but one dimension and do something similar, but I'm guessing there should be more efficient ways?
Any advice is welcome!
Joachim