Fix: "(*denseMatrix).Resize" changes the number of the rows and the columns itself.
Fix: "(*denseMatrix).NonZeros" leads infinite loop.