for (int i = 0; i < r; ++i) {
DoubleVector row = getRowVector(i);
// Ensure that we see a consistent length for all the rows
if (row.length() != c)
row = Vectors.subview(row, 0, c);
m[i] = row.toArray();
}
for (int i = 0; i < r; ++i)
unlockRow(i, c);