I would like to make a sparse matrix from the dense one, such that in each row or column only n-largest elements are preserved. I do the following:
sparse
n