A few years ago there was a PhD candidate who wanted to work with some of
Trenchard Moore's stuff. He refused arrays with a zero anywhere in its
shape. Such an approach can be a royal pain, since many verbs must first
find if the noun exists and then append as desired. This also requires that
there be arrays with a string of 1s in the shape and a zero somewhere. The
default shape is an important part of our analysis.
Why anyone should expect anything inside an array with zero in its shape
leaves me baffled. I do try to create my empty array with correct type,
i.e. boolean, integer, float or complex. Its not clear to me that it
matters since the first change will fix the type (and that may change
later).
I rather tend to think of scalars as arrays with i.0 shape, though it
doesn't really concern me, though I have to allow for slight changes as I
go.
We should be careful of using 'historic' reasons. Have you ever tried to
convince a mathematican that matrix multiplication (+/ .*) can be on other
than rank 2? And some time ago I had an argument that there are no such
things as a row vector or a column vector, a vector is a vector is a
vector. Row and column vectors are just ways of talking about a matrix with
a 1 in its shape.
There is a rather nice way to get a vector cross-product using a rank 3
array (and this is sometimes faster).
Then try to convince your mathematical friend that it doesn't have to be
only + and * (I wish you luck).
Ralph S
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm