Skip to content

diag() (PR#555)

1 message · Bill Venables

#
On the contrary I consider this to be the advertized performance.

The array m as defined above is a 2-d array, not a 1-d array, it just
so happens that one of the dimensions has extent 1, but so what?

I would favour retaining the definition

	dimension of array A  =  length(dim(A))

in all cases so that you can rely on it in programming and do not have
to consider even more exception handling.  It's bad enough already
with the drop convention.

If anything I think it requires a little more emphasis on what
constitutes an n-dimensional array and precisely what drop(m) does,
for example.  The above equality is *before* drop, not after, in other
words.