Closed vascoferreira25 closed 4 years ago
It's because matrix dimensions are usually m x n, so m-rows and n-cols help users distinguish better between these two. It is easy (or at least easier) to mix up nrows and ncols, or to forget to edit your code properly if you switch the orientation. In other words, just a useful mnemonic device.
Of course, nothing stops you from (def nrows mrows)
in your code if you prefer that.
Hi, I've been fiddling with neanderthal for fun and I came across the
mrows
function incore
that returns the number of rows of a matrix. There is a function calledncols
that returns the number of columns.Wouldn't it be better, for better consistency, to call this function
nrows
?