Improvements to NMatrix.random